HTML Galley and Archives won't display

database
plugin
howto
upgrade
ojs
Tags: #<Tag:0x007f769dfc5c68> #<Tag:0x007f769dfc5808> #<Tag:0x007f769dfc5010> #<Tag:0x007f769dfc4c78> #<Tag:0x007f769dfc4a98>

#1

hello! we have a new subdomain where we are trying to recreate our site (our main site is having problems). this is the link of our subdomain: dev.spmcpapers.com. we have already connected our original database to this new subdomain. our ongoing concerns right now are the html galleys won’t display (it says HTTP ERROR 500) and the “Archive” tab in the menu will not load too. what could be the problem? i was thinking that the old database is not compatible with the new installation of our ojs. am i right? what can i do to correct this?


#2

i was able to solve the “Archive” issue by changing the theme to bootstrap 3. it won’t load if you use default or child theme. i don’t know why that happens.


#3

Hi @cxl,

Did you check your PHP error log? A 500 error should always result in something more specific getting logged.

Regards,
Alec Smecher
Public Knowledge Project Team


#4

Hi @asmecher . These are my last 5 error logs. All the other error logs are mostly the same with these ones.

[02-May-2018 00:43:49 UTC] PHP Warning: mktime(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /home/ohakzjls/dev.spmcpapers.com/lib/pkp/lib/adodb/adodb-time.inc.php on line 1073
[02-May-2018 00:43:49 UTC] PHP Strict Standards: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/ohakzjls/dev.spmcpapers.com/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[02-May-2018 00:43:50 UTC] PHP Strict Standards: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/ohakzjls/dev.spmcpapers.com/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[02-May-2018 00:44:30 UTC] PHP Strict Standards: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/ohakzjls/dev.spmcpapers.com/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 24
[02-May-2018 00:44:30 UTC] PHP Strict Standards: Non-static method Validation::verifyPassword() should not be called statically in /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/security/Validation.inc.php on line 58


#5

Hi @cxl,

There are likely a lot of log entries that aren’t relevant. Try triggering the 500 error, then immediately look at the log; watch for something that contains the word “Error” (as opposed to just warnings or strict standards messages).

Regards,
Alec Smecher
Public Knowledge Project Team


#6

hi @asmecher,

i tried triggering the 500 error again and this was what’s stated in the error log:

[17-May-2018 01:07:02 UTC] PHP Fatal error: Call to undefined method IssueDAO::getIssueByArticleId() in /home/ohakzjls/dev.spmcpapers.com/plugins/generic/htmlArticleGalley/HtmlArticleGalleyPlugin.inc.php on line 179

i checked it out and this was the line that was pointed out:

$issue = $issueDao->getIssueByArticleId($galley->getSubmissionId());

the page even stated this now: “DB Error: Unknown column ‘submission_id’ in ‘where clause’”

thank you alec.


#7

Hi @cxl,

Hmm, it seems like you may have code mixed together from different versions of OJS. What version of OJS are you running?

Regards,
Alec Smecher
Public Knowledge Project Team


#8

i am running OJS 3.1.1.

what code might that be, alec?


#9

i turned stack trace on and this appeared:

DB Error: Unknown column ‘submission_id’ in ‘where clause’
Stack Trace:
File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/db/DAO.inc.php line 200
Function: DAO->retrieve(“SELECT * FROM citations WHERE submission_id = ? ORDER B…”, Array(1), False)

File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/citation/CitationDAO.inc.php line 124
Function: DAO->retrieveRange(“SELECT * FROM citations WHERE submission_id = ? ORDER B…”, Array(1), Null)

File: /home/ohakzjls/dev.spmcpapers.com/pages/article/ArticleHandler.inc.php line 157
Function: CitationDAO->getBySubmissionId(“118”)

File: (unknown) line (unknown)
Function: ArticleHandler->view(Array(2), Object(Request))

File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/core/PKPRouter.inc.php line 372
Function: call_user_func(Array(2), Array(2), Object(Request))

File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/core/PKPPageRouter.inc.php line 233
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(2), False)

File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))

File: /home/ohakzjls/dev.spmcpapers.com/lib/pkp/classes/core/PKPApplication.inc.php line 247
Function: Dispatcher->dispatch(Object(Request))

File: /home/ohakzjls/dev.spmcpapers.com/index.php line 68
Function: PKPApplication->execute()

i checked out our database and the “citations” table does not have a submissions_id column.


#10

hi @NateWr

our archives page shows a blank page when using the child theme. we have built our original site using the child theme and we wanted to continue it in OJS 3.1.1.

thank you.


#11

Hi @cxl,

If you’ve built your own child theme, you may need to update the issue archive pagination template. You can learn more here: https://github.com/NateWr/bootstrap3/issues/83#issuecomment-385975866


#12

it worked @NateWr! thank you. one more thing, our cover image for each issue won’t appear although it is uploaded in our dashboard.


#13

Does your templates/frontend/objects/issue_summary.tpl include cover image code that looks like this?


#14

it doesn’t have a code like this. i tried adding this code though, it still doesn’t show.


#15

You may need to clear your template cache after making changes. You can do this under the Administration area in the backend.