Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OJS] RSS buttons left-over from OJS 2.x #3412

Closed
carzamora opened this issue Feb 21, 2018 · 10 comments
Closed

[OJS] RSS buttons left-over from OJS 2.x #3412

carzamora opened this issue Feb 21, 2018 · 10 comments
Assignees
Milestone

Comments

@carzamora
Copy link
Contributor

three buttons (RRS 1.0, RSS 2.0 and Atom 1.0) are left-over on notification page:

example:
http://www.biodiversnathist.com/index.php/bnh/notification/
dddddd

@asmecher we talk this in the forum: https://forum.pkp.sfu.ca/t/issue-with-rss/38268/6

@asmecher
Copy link
Member

I took a closer look and that code is actually working for me. Can you check your PHP error log to see what messages correspond to the blank page?

@carzamora
Copy link
Contributor Author

in log file appears this lines:
[21-Feb-2018 22:45:26 America/Santiago] PHP Fatal error: Uncaught Error: Call to a member function getAssocId() on null in /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationManager.inc.php:56
Stack trace:
#0 /home/biodiver/public_html/classes/notification/NotificationManager.inc.php(40): PKPNotificationManager->getNotificationUrl(Object(Request), Object(Notification))
#1 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(435): NotificationManager->getNotificationUrl(Object(Request), Object(Notification))
#2 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(400): PKPNotificationOperationManager->formatNotification(Object(Request), Object(Notification), 'notification/at...')
#3 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(102): PKPNotificationOperationManager->formatNotifications(Object(Request), Object(DAOResultFactory), 'notification/at...')
#4 /home/biodiver/public_html/lib/pkp/pages/notification/Notific in /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationManager.inc.php on line 56
[21-Feb-2018 22:45:27 America/Santiago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64
[21-Feb-2018 22:45:27 America/Santiago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[21-Feb-2018 22:45:27 America/Santiago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[21-Feb-2018 22:45:27 America/Santiago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[21-Feb-2018 22:45:27 America/Santiago] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[21-Feb-2018 22:45:27 America/Santiago] PHP Warning: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[21-Feb-2018 22:45:27 America/Santiago] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[21-Feb-2018 22:45:27 America/Santiago] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[21-Feb-2018 22:45:27 America/Santiago] PHP Warning: Declaration of CustomBlockPlugin::getContents(&$templateMgr, $request = NULL) should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134

@carzamora
Copy link
Contributor Author

and on the page with display_errors = On in config.php this lines:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/biodiver/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/biodiver/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php:64) in /home/biodiver/public_html/lib/pkp/classes/session/SessionManager.inc.php on line 59

Warning: Cannot modify header information - headers already sent by (output started at /home/biodiver/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php:64) in /home/biodiver/public_html/lib/pkp/classes/session/SessionManager.inc.php on line 225

Warning: Cannot modify header information - headers already sent by (output started at /home/biodiver/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php:64) in /home/biodiver/public_html/lib/pkp/classes/session/SessionManager.inc.php on line 233

Warning: Declaration of CustomBlockPlugin::getSeq() should be compatible with BlockPlugin::getSeq($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134

Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134

Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134

Warning: Declaration of CustomBlockPlugin::getContents(&$templateMgr, $request = NULL) should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/biodiver/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134

Fatal error: Uncaught Error: Call to a member function getAssocId() on null in /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationManager.inc.php:56 Stack trace: #0 /home/biodiver/public_html/classes/notification/NotificationManager.inc.php(40): PKPNotificationManager->getNotificationUrl(Object(Request), Object(Notification)) #1 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(435): NotificationManager->getNotificationUrl(Object(Request), Object(Notification)) #2 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(400): PKPNotificationOperationManager->formatNotification(Object(Request), Object(Notification), 'notification/at...') #3 /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationOperationManager.inc.php(102): PKPNotificationOperationManager->formatNotifications(Object(Request), Object(DAOResultFactory), 'notification/at...') #4 /home/biodiver/public_html/lib/pkp/pages/notification/Notific in /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationManager.inc.php on line 56

@asmecher
Copy link
Member

The relevant line in the log is...

Fatal error: Uncaught Error: Call to a member function getAssocId() on null in /home/biodiver/public_html/lib/pkp/classes/notification/PKPNotificationManager.inc.php:56

It looks to me like there's an entry in notifications that refers to a nonexistent announcement, and that's what's breaking the feed. Do you get any results for the following SQL query?

SELECT n.notification_id FROM notifications n LEFT JOIN announcements a ON (n.assoc_id = a.announcement_id) WHERE a.announcement_id IS NULL AND n.assoc_type = 522;

@carzamora
Copy link
Contributor Author

Yes @asmecher , this is the result:
image

@asmecher
Copy link
Member

@t4x0n, try deleting all those rows and I suspect you'll see the problem go away.

@carzamora
Copy link
Contributor Author

Yes! this resolves the issue, but I do not understand... why?

I try with the SQL query in another journal but with * for see all columns and I can see one row for each user, and all these rows was created at the same time in the table, maybe this occurred when was installed the update?
image

@asmecher
Copy link
Member

There was some bad data in your OJS 2.x database; the query identified it, and now you've removed it. Glad to hear it's working now! I've flagged this in #3351 for potential automatic clean-up.

@carzamora
Copy link
Contributor Author

but this issue appears not only in OJS 2.X updated to 3, in my installation with OJS 3.0 updated to 3.1 is the same issue, just in clean installation on OJS 3.1 this not occur

@asmecher
Copy link
Member

asmecher commented Mar 2, 2018

Thanks, @t4x0n -- I took another look and found out this can still occur in the current code. Stay tuned for some patches and cleanup code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants