[OJS 3.1.0 & 3.2.0] Renaming the Home Directory

Hello,

I have an inquiry regarding renaming the home directory in OJS 3.1.0, so that Home / Archives / Vol X No Y is displayed as Name of Journal / Archives / Vol X No Y. Thanks in advance.

Regards,
Mohamed Agoor

Hello @asmecher, @israel.cefrin,

Any suggestions on how I could go about doing this?

Regards,
Mohamed Agoor

go to the navigation menu in the file manager and yo can edit the name there. /public_html/templates/frontend/components/primaryNavMenu.tpl.

Hi @varshilmehta,

Unfortunately, I couldn’t find anything there.

Any other suggestions on this?

Hi @asmecher,

Could you please help me with this issue? Thanks in advance.

Hi @Mohamed_Agoor,

Look in…

  • lib/pkp/templates/frontend/components/breadcrumbs.tpl
  • templates/frontend/components/breadcrumbs_issue.tpl
  • templates/frontend/components/breadcrumbs_article.tpl

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

In lib/pkp/templates/frontend/components/breadcrumbs.tpl I changed {translate key=“common.homepageNavigationLabel”} to {translate key=“name of journal”} and now on the website the link looks like this: ##name of journal##. How can I fix that? Thanks.

Hi @Mohamed_Agoor,

To get the name of the current journal, use {$currentJournal->getLocalizedName()|escape} rather than {translate key="..."}.

Note that you’re starting to work with code modifications when you do this, and you’ll need to know some basics. We won’t be able to walk you through debugging, coding, and maintenance, but can sometimes provide some guidance if you get stuck.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks, I’ll keep that in mind. I modified the code and it worked. Thank you so much for your assistance.

Hi @asmecher,

I’m currently using OJS 3.2.0.3 and that code isn’t working. Any idea
why that might be?

Regards,
Mohamed Agoor

Hi @Mohamed_Agoor,

In OJS 3.2.0 and newer, you should be able to use:

{$currentJournal->getLocalizedData('name')|escape}

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Unfortunately, that code didn’t work either.

Hi @Mohamed_Agoor,

When you say it doesn’t work, can you describe further? Is there an error message in your error log, is the page blank, etc?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks for the follow up. When I modify the code, no changes occur. The frontend remains the same as if I had not made any modifications to the code. Below is what I found in my error log (the errors are repeated many more times than quoted):

[18-May-2020 00:00:28 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 00:00:28 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 00:01:46 UTC] PHP Notice: Undefined offset: 2 in /home/agoor/public_html/ojs/lib/pkp/classes/security/authorization/internal/QueryUserAccessibleWorkflowStageRequiredPolicy.inc.php on line 44
[18-May-2020 00:01:46 UTC] PHP Notice: Undefined offset: 3 in /home/agoor/public_html/ojs/lib/pkp/classes/security/authorization/internal/QueryUserAccessibleWorkflowStageRequiredPolicy.inc.php on line 48
[18-May-2020 00:35:02 UTC] ojs2: 404 Not Found
[18-May-2020 00:35:02 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 00:35:02 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 00:35:02 UTC] ojs2: 404 Not Found
[18-May-2020 01:26:28 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/controllers/grid/settings/submissionChecklist/SubmissionChecklistGridHandler.inc.php on line 99
[18-May-2020 10:49:58 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/pages/authorDashboard/PKPAuthorDashboardHandler.inc.php on line 159
[18-May-2020 10:52:00 UTC] PHP Warning: Creating default object from empty value in /home/agoor/public_html/ojs/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[18-May-2020 10:52:00 UTC] PHP Warning: Creating default object from empty value in /home/agoor/public_html/ojs/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^52019e87b90081f2c6bfa717994d81ab7712dd1f_0.app.frontendcomponentssearchF.php on line 30
[18-May-2020 10:52:01 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:01 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 10:52:02 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 12:24:17 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/agoor/public_html/ojs/lib/pkp/classes/core/Core.inc.php on line 231
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/agoor/public_html/ojs/lib/pkp/classes/core/Core.inc.php on line 231
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/agoor/public_html/ojs/lib/pkp/classes/core/Core.inc.php on line 231
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/agoor/public_html/ojs/lib/pkp/classes/core/Core.inc.php on line 231
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::_getBaseUrlAndPath() should not be called statically in /home/agoor/public_html/ojs/lib/pkp/classes/core/Core.inc.php on line 231
[18-May-2020 12:24:21 UTC] PHP Deprecated: Non-static method Core::removeBaseUrl() should not be called statically in /home/agoor/public_html/ojs/plugins/generic/usageStats/UsageStatsLoader.inc.php on line 767
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 14:35:15 UTC] PHP Notice: Trying to access array offset on value of type null in /home/agoor/public_html/ojs/lib/pkp/lib/vendor/wikimedia/less.php/lib/Less/Parser.php on line 1927
[18-May-2020 17:01:06 UTC] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/agoor/public_html/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 69
[18-May-2020 17:01:06 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 17:01:06 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 17:01:07 UTC] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/agoor/public_html/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 69
[18-May-2020 17:01:07 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 17:01:07 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 17:01:20 UTC] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/agoor/public_html/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 69
[18-May-2020 17:01:20 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 17:01:20 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 17:01:20 UTC] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/agoor/public_html/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 69
[18-May-2020 17:01:20 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 107
[18-May-2020 17:01:20 UTC] PHP Deprecated: Non-static method PKPApplication::getRequest() should not be called statically in /home/agoor/public_html/ojs/plugins/themes/bootstrap3/BootstrapThreeThemePlugin.inc.php on line 129
[18-May-2020 17:01:27 UTC] PHP Warning: ini_set(): A session is active. You cannot change the session module’s ini settings at this time in /home/agoor/public_html/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 69

Hi @Mohamed_Agoor,

If you’re sure you’re not modifying the wrong template file, I’d suggest double-checking the file permissions in the cache/t_compile directory. It’s possible that OJS doesn’t have sufficient rights to recompile the templates, which would result in the situation you describe.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

The permissions in the cache/t_compile directory are all set to 0644.

Regards,
Mohamed Agoor

Hi @Mohamed_Agoor,

You’ll need to consider more than just numeric permissions alone; there’s also file ownership, and on some servers, you may also have SELinux security extensions to work with.

You should be able to remove cache/t_compile/*.php, and let OJS re-create those files. If it doesn’t, then you’ll need to fix the file permissions on cache/t_compile.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

So just to be clear, I should delete all the files in cache/t_compile, and the issue may eventually be resolved on its own. I’m assuming I shouldn’t have any issues after deleting those files; do I have the correct understanding? Thanks.

Regards,
Mohamed Agoor

Hi @Mohamed_Agoor,

If you delete all the files from templates/t_compile, OJS will re-generate them as needed, assuming it has sufficient file permissions to do so. If your problem was one of incorrect file permissions amongst the .php files, this will resolve it. If your problem is that OJS can’t write to templates/t_compile at all, you’ll know, because you won’t see new .php files generated there.

Regards,
Alec Smecher
Public Knowledge Project Team