OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Notify Users Errors

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Notify Users Errors

Postby anna_marini » Tue Apr 14, 2009 2:57 am

Hi all,
on our OCS installation (2.1.0.1) we encounter two problems using the Send Mail function as director:
http://myconferences/index.php/conf/con ... otifyUsers

1- The user count for some categories appears to be wrong

2- when I try to send an email, I receive the following php error

Fatal error: Call to a member function _returnUserFromRowWithData() on a
non-object in /var/conferences/classes/db/DAOResultFactory.inc.php on line
81

Any suggestions on how to fix this?
Thank's a lot,
Anna
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: Notify Users Errors

Postby jmacgreg » Wed Apr 15, 2009 9:22 am

Hi Anna,

Regarding point 1: see viewtopic.php?f=3&t=4323. In a nutshell, some counts are a subset of that particular group, for example the "presenters" count is in fact all published presenters.

Regarding point 2: I'll have a developer get back to you shortly.

Cheers,
James
jmacgreg
 
Posts: 4162
Joined: Tue Feb 14, 2006 10:50 am

Re: Notify Users Errors

Postby mcrider » Wed Apr 15, 2009 1:43 pm

Hi Anna,

Could you turn on the show_stacktrace option in config.inc.php and get back to us with the resulting output?

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Notify Users Errors

Postby anna_marini » Fri Apr 17, 2009 6:06 am

Dear Matt
here the stack trace related to the fatal error that occours when we try to send a notificacion email
/director/notifyUsers
to
All registrants (1 users)
All paid registrants (1 users)

Thanks a lot,
Anna


(postgres7): SELECT * FROM sessions WHERE session_id = ? [ (0=>'cf01435b87c0834300ce32081048034d') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM users WHERE user_id = ? [ (0=>'1') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM user_settings WHERE user_id = ? [ (0=>'1') ]
________________________________________

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/conferences/lib/adodb/adodb.inc.php:377) in /var/conferences/classes/session/SessionManager.inc.php on line 57
________________________________________
(postgres7): UPDATE sessions SET user_id = ?, ip_address = ?, user_agent = ?, created = ?, last_used = ?, remember = ?, data = ? WHERE session_id = ? [ (0=>'1') (1=>'131.175.80.153') (2=>'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.0.8) Gecko/2...') (3=>'1239958885') (4=>'1239971660') (5=>'0') (6=>'username|s:17:"admin-conferences";userId|i:1;') (7=>'cf01435b87c0834300ce32081048034d') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM conferences WHERE path = ? [ (0=>'testelpub') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM site
________________________________________
________________________________________
(postgres7): SELECT * FROM site_settings
________________________________________
________________________________________
(postgres7): SELECT COUNT(*) FROM plugin_settings WHERE plugin_name = ? AND setting_name = ? AND conference_id = ? AND sched_conf_id = ? [ (0=>'AcronPlugin') (1=>'crontab') (2=>'0') (3=>'0') ]
________________________________________
________________________________________
(postgres7): UPDATE plugin_settings SET setting_value = ?, setting_type = ? WHERE plugin_name = ? AND setting_name = ? AND conference_id = ? AND sched_conf_id = ? [ (0=>'a:2:{i:0;a:3:{s:9:"className";s:20:"tasks.ReviewReminder";s:9:"f...') (1=>'object') (2=>'AcronPlugin') (3=>'crontab') (4=>'0') (5=>'0') ]
________________________________________
________________________________________
(postgres7): SELECT setting_name, setting_value, setting_type FROM plugin_settings WHERE plugin_name = ? AND conference_id = ? AND sched_conf_id = ? [ (0=>'AcronPlugin') (1=>'0') (2=>'0') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM sched_confs WHERE path = ? and conference_id = ? [ (0=>'testelpub09') (1=>'5') ]
________________________________________
________________________________________
(postgres7): SELECT COUNT(*) FROM roles WHERE conference_id = ? AND sched_conf_id = ? AND user_id = ? AND role_id = ? [ (0=>'5') (1=>'10') (2=>'1') (3=>'64') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM versions WHERE current = 1
________________________________________
________________________________________
(postgres7): SELECT COUNT(*) FROM sched_confs WHERE conference_id = ? AND end_date < now() [ (0=>'5') ]
________________________________________
________________________________________
(postgres7): SELECT COUNT(*) FROM sched_confs WHERE conference_id = ? AND start_date < now() AND end_date > now() [ (0=>'5') ]
________________________________________
________________________________________
(postgres7): SELECT * FROM sched_confs WHERE sched_conf_id = ? [ (0=>'10') ]
________________________________________
________________________________________
(postgres7): SELECT COALESCE(ed.subject, dd.subject) AS subject, COALESCE(ed.body, dd.body) AS body, COALESCE(e.enabled, 1) AS enabled, d.email_key, d.can_edit, d.can_disable, e.conference_id, e.sched_conf_id, e.email_id, dd.locale, d.from_role_id, d.to_role_id FROM email_templates_default d LEFT JOIN email_templates_default_data dd ON (dd.email_key = d.email_key) LEFT JOIN email_templates e ON (d.email_key = e.email_key AND e.conference_id = ? AND e.sched_conf_id = ?) LEFT JOIN email_templates_data ed ON (ed.email_key = e.email_key AND ed.conference_id = e.conference_id AND ed.sched_conf_id = e.sched_conf_id AND ed.locale = dd.locale) WHERE d.email_key = ? AND dd.locale = ? [ (0=>'5') (1=>'0') (2=>'PUBLISH_NOTIFY') (3=>'en_US') ]
________________________________________
________________________________________
(postgres7): SELECT ed.subject, ed.body, 1 AS enabled, e.email_key, 1 AS can_edit, 0 AS can_disable, e.conference_id, e.sched_conf_id, e.email_id, ed.locale, NULL AS from_role_id, NULL AS to_role_id FROM email_templates e LEFT JOIN email_templates_data ed ON (ed.email_key = e.email_key AND ed.conference_id = e.conference_id AND ed.sched_conf_id = e.sched_conf_id) LEFT JOIN email_templates_default d ON (e.email_key = d.email_key) WHERE d.email_key IS NULL AND e.conference_id = ? AND e.sched_conf_id = ? AND e.email_key = ? AND ed.locale = ? [ (0=>'5') (1=>'0') (2=>'PUBLISH_NOTIFY') (3=>'en_US') ]
________________________________________
________________________________________
(postgres7): SELECT DISTINCT u.* FROM users u, registrations r WHERE u.user_id = r.user_id AND r.sched_conf_id = ? [ (0=>'10') ]
________________________________________

Fatal error: Call to a member function _returnUserFromRowWithData() on a non-object in /var/conferences/classes/db/DAOResultFactory.inc.php on line 81
________________________________________
(postgres7): UPDATE sessions SET user_id = ?, ip_address = ?, user_agent = ?, created = ?, last_used = ?, remember = ?, data = ? WHERE session_id = ? [ (0=>'1') (1=>'131.175.80.153') (2=>'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.0.8) Gecko/2...') (3=>'1239958885') (4=>'1239971660') (5=>'0') (6=>'username|s:17:"admin-conferences";userId|i:1;') (7=>'cf01435b87c0834300ce32081048034d') ]
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: Notify Users Errors

Postby mcrider » Fri Apr 17, 2009 10:56 am

Hi Anna,

That output is actually from turning on 'debug' in config.inc.php, which shows database output--Could you make sure that 'show_stacktrace' (near the bottom of the file) is turned on and not 'debug'?

Also have you made any notable modifications to your OCS code, or upgraded from a previous version?

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Notify Users Errors

Postby anna_marini » Mon Apr 20, 2009 1:25 am

Hi Matt,
with only 'show_stacktrace' option (config.inc.php line 350) enabled, the resulting output is the same Fatal Error that appears when the option is Off..

Fatal error: Call to a member function _returnUserFromRowWithData() on a non-object in /var/conferences/classes/db/DAOResultFactory.inc.php on line 81

We apported code modifications, applied pathces, but not envolving this subject..

Thank's ,
anna
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: Notify Users Errors

Postby mcrider » Mon Apr 20, 2009 12:46 pm

Hi Anna,

You should be getting more output than that from the stacktrace--Check your PHP log to see if anything is put in there. Also, any changes you have made elsewhere in the system may affect how this is working. I would suggest making a diff against a stock OCS 2.1.0.1 by downloading OCS 2.1.0.1 from our web site and issuing this command:
Code: Select all
diff -r [/path/to/stock-ojs-2.1.1-install] [/path/to/modified-ojs-2.1.1-install] > changes.diff
That file will summarize all the changes you've made and should help us track down anything bad that's happening.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Notify Users Errors

Postby anna_marini » Tue Apr 21, 2009 6:20 am

Hi Matt,
now the user count for the categories

All Presenteres
All registrants
All Paid Registrants

appears to be correct!

We solved that deleting the GROUP BY conditions in queries

/classes/paper/PresenterDAO.inc.php
Code: Select all
      function &getPresenterCount($schedConfId) {
                $result = &$this->retrieveRange(
                        'SELECT COUNT(*) AS presenter_count
                        FROM    paper_presenters pa,
                                published_papers pp,
                                sched_confs sc,
                                papers p
                        WHERE   sc.sched_conf_id = p.sched_conf_id AND
                                pa.paper_id = p.paper_id AND
                                pp.paper_id = p.paper_id AND
                                sc.sched_conf_id = ?',
                        (int) $schedConfId
                );


/classes/registration/RegistrationDAO.inc.php
Code: Select all
function &getRegisteredUserCount($schedConfId, $paid = true) {
                $result = &$this->retrieve(
                        'SELECT COUNT(*) AS user_count
                        FROM    users u,
                                registrations r
                        WHERE   u.user_id = r.user_id AND
                                r.sched_conf_id = ?
                                ' . ($paid?' AND r.date_paid IS NOT NULL':'') . '',
                        (int) $schedConfId
                );


However, no solution for the fatal error when we send notification email to Registrants..

Anna
anna_marini
 
Posts: 42
Joined: Mon Mar 19, 2007 3:06 am

Re: Notify Users Errors

Postby tshore » Fri Mar 12, 2010 11:24 am

The problem still exists in a very recent download of OCS 2.3. At least for the count of registrants. Please check on this in Bugzilla.

Thank you.
tshore
 
Posts: 263
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

Re: Notify Users Errors

Postby jmacgreg » Wed Mar 17, 2010 7:39 pm

Hi Trudy,

Thanks -- see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5232.

Cheers,
James
jmacgreg
 
Posts: 4162
Joined: Tue Feb 14, 2006 10:50 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests