OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Blank pages (translator plugin) when restful urls are on

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.

Blank pages (translator plugin) when restful urls are on

Postby evan » Mon Jun 03, 2013 4:32 am

Recently after enabling restful urls to our OCS installation on the production server, we run into a problem.
All the second level pagers of the translator plugin, lead to non existent urls and thus to not found pages. After some research, I've come to conclude that the problem lies in the apache rewriting rules, that cannot handle the requested urls.

In our case an url that's not working is something like this
Code: Select all
usualpath/editLocaleFile/el_GR/locale%252Fel_GR%252Fmanager.xml?localeContentsPage=2#localeContents


The rewrite rules that are necessary for clean urls to work, are as suggested in an older thread (viewtopic.php?f=2&t=2616)

Code: Select all
Options all -Indexes
AllowOverride none
<IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

The above configuration lies in the ocs virtual host of the server (we are not using .htaccess file).
On the other hand the localeFile.tpl template file that creates the pager links, performs two times an
Code: Select all
escape:"url"
on the filename, so the slashes are converted to %252F.

All the trial and error attempts I conducted on the rewrite rules did not have any result, so any suggestion would be greatly welcomed.

Regards,
Evan
evan
 
Posts: 9
Joined: Tue May 29, 2012 4:14 am

Re: Blank pages (translator plugin) when restful urls are on

Postby evan » Wed Jun 12, 2013 3:25 am

Hello there,

i finally figured it out. Apache by default denies all urls containing encoded slashes, so all the urls with %252F in the path part, were rejected. So all i did was put the directive AllowEncodedSlashes NoDecode in the virtual host file, to inform apache not to touch the requested url, and everything worked fine.

This option is recommended in the apache documentation, as encoded slashes may raise security issues. But i still do not understand the need for those two times encoded slashes in the urls of the translator plugin.

Hope this helps

Regards,
Evan
evan
 
Posts: 9
Joined: Tue May 29, 2012 4:14 am


Return to OCS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 1 guest