11
ghia
Re: Notification not working
  • 2008/12/23 16:45

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Can you send other emails with the site (eg registration)?
Is notification working on some modules? Which are and which not?
Is the notification method enabled and set to email?

12
davidsless
Re: Notification not working
  • 2008/12/23 23:10

  • davidsless

  • Just popping in

  • Posts: 49

  • Since: 2006/10/5


I have just ran some tests.

We ca send emails to groups and individuals.

Registration emails all work

Notification does not work on any installed modules. The ones tested are smartsection, olédrion, and newbbex.



13
davidsless
Re: Notification not working
  • 2008/12/23 23:15

  • davidsless

  • Just popping in

  • Posts: 49

  • Since: 2006/10/5


just noticed the following error message when trying to update notifications in smartsection:

[Fatal error: Call to a member function notLoaded() on a non-object in /home/communic/public_html/modules/smartsection/category.php on line 20
All errors (1) queries (5) blocks (0) extra (0) timers (3)
Errors
Notice: Only variable references should be returned by reference in file /modules/smartsection/class/category.php line 435


14
hervet
Re: Notification not working
  • 2009/1/14 10:25

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


David had two problems:

1/ The notifications block is not updated when there is some cache on the modules
2/ There is a permissions problem (the linux/unix) user which runs Apache can't access the modules templates files

15
hervet
Re: Notification not working
  • 2009/1/14 13:26

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Problem definitively solved.

In this folder:
/xoops/language
tehre was a sub folder called "cri".

Then, in the genral preferences, in the "Default language" select box, there was : "cri" selected.
Instead of “english”

As a consequence, XOOPS was trying to find, for each module, the notifications templates in this kind of folder:
/xoops/modules/mymodule/language/CRI/mail_template/notification_email.tpl

Instead of:
/Xoops/modules/mymodule/language/english/mail_template/notification_email.tpl

Of course, the mails templates of each module could not be found !

Hope this will help someone help because I spent a incredible amount of hours on this problem !

Where I did not had help: in Xoopsmailer.
Because each template is opened with something like this :
@fread(...)

So even with Php debug's mode activated, you can't detect that the mailer can't read the template file...
WTF !

16
davidsless
Re: Notification not working
  • 2009/1/17 0:32

  • davidsless

  • Just popping in

  • Posts: 49

  • Since: 2006/10/5


Many many thanks to Hervé who solved this problem. He put in many hours to fix this over and above. It's a measure of his dedication to and knowledge of XOOPS that he eventually tracked it down. A first class bit of work.

I am, of course, the cause of the problem in the first place. I created the CRI language folder so that we at CRI could customise the English on our site—communication.org.au— for our specific needs and users. In doing so we did not realise the programming implications of what we were doing.

For me this raises two important issues for the XOOPS community.

1. Already raised by Hervé, is the fact that the fault was not showing up in the debug mode. I don't know enough about programming to suggest a fix, but it should be possible to do so and should be added into the debug mode.

2. XOOPS is built to be customised: templates, themes, and languages are all modifiable. It's one of the things that makes XOOPS such a good platform. But it is not clear, as in this case, to a non-programmer, or someone unfamiliar with the overall architecture and dependencies of code are, where the limits of that customisation are, when a change is likely to have implications beyond the specific file one is working on. It might be helpful to all users if there were notes in folders and files signalling those limits.

I don't know how practical that is, but it might help people like me, who want to use XOOPS to the full, but would rather not create hidden nightmares for brave and highly competent people like Hervé to sort out.

This is just a suggestion. In the meantime hurray for for Hervé!

17
Mamba
Re: Notification not working
  • 2009/1/17 2:29

  • Mamba

  • Moderator

  • Posts: 11409

  • Since: 2004/4/23


Yes, Hervé is D'Man!!! One of the best XOOPS developers, and his modules speak volumes about it!!!

Thanks Hervé for making another XOOPS user a happy one!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

18
ghia
Re: Notification not working
  • 2009/1/17 18:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Where I did not had help: in Xoopsmailer.
Because each template is opened with something like this :
@fread(...)

So even with Php debug's mode activated, you can't detect that the mailer can't read the template file...
This use of @ for the suppression of error messages in PHP is some kind of lazy programming. The program stays running, but the failed action is not executed and may impair subsequent processing.
Better is to check before trying to open a file or to read from it, that the file exists etc. It costs more code to prepair for some actions, but if it fails, users can be indicated about what and where is the problem.
Ideal the @ should not be used in XOOPS.
I believe the same problem exists in the code for the installation of modules. Nothing is showed and nobody has a clue why.
PHP5 can give easier and better error handling with the throw exception handling and try - catch blocks.

19
wishcraft
Re: Notification not working

Ok david's problem with newbbex, with the mode being set on xoops_version.php to Notifcation Send then Delete.

This was disable the quickest way possible.

Thanks.
Resized Image
http://www.ohloh.net/accounts/226400

Follow, Like & Read:-

twitter.com/RegaltyFamily
github.com/Chronolabs-Cooperative
facebook.com/DrAntonyRoberts

Login

Who's Online

248 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 248


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits