My links to my "Privacy" and "Administration" pages produce a 404 error, OJS 3.3 LTS

When I click on the Privacy or the Administration links the following error message is issued (the one below is for the Administration).

404 Not Found
Stack Trace:
File: /home/UserID/domains/JournalABCD/public_html/lib/pkp/classes/handler/PKPHandler.inc.php line 591
Function: Dispatcher->handle404()

File: /home/UserID/domains/JournalABCD/public_html/pages/index/IndexHandler.inc.php line 34
Function: PKPHandler->getTargetContext(Object(Request), Null)

File: /home/UserID/domains/JournalABCD/public_html/lib/pkp/classes/core/PKPRouter.inc.php line 397
Function: IndexHandler->index(Array(0), Object(Request))

File: /home/UserID/domains/JournalABCD/public_html/lib/pkp/classes/core/PKPPageRouter.inc.php line 246
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)

File: /home/UserID/domains/JournalABCD/public_html/lib/pkp/classes/core/Dispatcher.inc.php line 144
Function: PKPPageRouter->route(Object(Request))

File: /home/UserID/domains/JournalABCD/public_html/lib/pkp/classes/core/PKPApplication.inc.php line 360
Function: Dispatcher->dispatch(Object(Request))

File: /home/UserID/domains/JournalABCD/public_html/index.php line 68
Function: PKPApplication->execute()


I have the Privacy information entered.

I am using OJS-3.3.0-20 LTS.

Hi @gagobezie,

Are you using URL rewriting (e.g. via .htaccess and mod_rewrite)? Have you changed your journal’s URL at some point since OJS was installed?

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher for your reply.

I haven’t changed the journal URL after installation. However, I have changed the base_url[journal] folder trying to fix plugin installation issues that I had encountered before I found out that it was caused by a mismatch in PHP Version.

Regarding URL re-writing, I am told that mod_rewrite is on by default by the hosting provider. And in my .htaccess file, I have the following code (I got it from online sources, as I am not proficient in this):

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Regards,

Hi @gagobezie,

If you have a base_url[index] setting in config.inc.php, it’s likely that it’s misconfigured and causing the problem with the administration link.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you, again, @asmecher, for your helpful response.

Regarding the Privacy statement, I managed to get it work by setting sitewide_privacy_statement = Off (I had changed it to On before).

Regarding the base_url[index], please suggest what I could do to fix the error. What I saw change, by changing the settings was it took me to the OJS Github page pointing to the pages/admin/index.php file.

Regards,

Hi @gagobezie,

What do you have in your base_url[...] settings, and what should your URLs be? (Feel free to PM me if you don’t want to post these publicly.)

Regards,
Alec Smecher
Public Knowledge Project Team

The Privacy page returning 404 error was resolved as indicated above.

The Administration page returning 404 error was resolved as follows:
First the pages/admin/ files were examined.
They had very long html content that may have been caused by earlier attempts to resolve other issues, among which a mismatch in PHP version (and hence failure to install plugins) were made;
Thefore, these files were deleted (leaving an empty pages/admin folder),
Then navigation to the Administration page was attempted, that worked as expected.

A lot of thanks go to @asmecher, for his ideas on this post and direct messages.

This topic was automatically closed after 10 days. New replies are no longer allowed.