Page 1 of 1

Plugin Documentation can't be loaded

Posted: Fri Feb 03, 2012 1:31 pm
by blog.brockha.us
This is a little strange.. I updated my productive blog to 1.6 and my testblog to 1.7.
In both blogs, when I try to load a plugin documentation from the plugin configuration, I will be leaded to my blog index page. But when I click on the changelog link in the plugin configuration, I see the changelog.

This link works:

Code: Select all

http://grischa.scorpius.uberspace.de/blog/plugins/serendipity_event_spamblock_bayes/ChangeLog
This will show my blogs index page

Code: Select all

http://grischa.scorpius.uberspace.de/blog/plugins/serendipity_event_spamblock_bayes/documentation_de.html
As i am very sure, that this worked "before" (but I can't remember when I tried this last): Does anybody know, what might be the reason for this? And was something changed there in s9y 1.6?

I thought perhaps the external plugin permalink could be the reason. It is "plugin" and not "plugins", but I even changed that to "extern" w/o change of the problem.

Setting it back produces this htaccess entry btw:

Code: Select all

RewriteRule ^(plugin|plugin)/(.*) index.php?url=$1/$2 [L,QSA]
(plugin|plugin) :?:

Re: Plugin Documentation can't be loaded

Posted: Fri Feb 03, 2012 3:53 pm
by Timbalu
I remember... that did wonder me too ... and I forgot about it...
It is the last rule!

To make this work for plugin documentaries would need additionally something similar to this one line, right after base, which tells mod_rewrite to ignore this file from RewriteRule(s):

Code: Select all

RewriteEngine On
RewriteBase /serendipity/
RewriteRule ^(.*/documentation([0-9a-z\.\_\+]+)\.html?)$ - [L]
...
RewriteRule (.*\.html?) index.php?url=/$1 [L,QSA]


Re: Plugin Documentation can't be loaded

Posted: Fri Feb 03, 2012 4:05 pm
by garvinhicking
Hi!

I think, plugins that provide a documentation.html need to have a .htaccess with "RewriteEngine Off" in their directory.

Everything else would be hard to fix in existing installations...

Re: Plugin Documentation can't be loaded

Posted: Fri Feb 03, 2012 4:14 pm
by Timbalu
But this is bad, as documentary resides in an overcrouded folder and you do not want anything else inside your plugin dir to be loaded out of scope.

Or we do not shut up rewrite engine there, but put this rule into the plugins htaccess. What about going this way?

Re: Plugin Documentation can't be loaded

Posted: Sun Feb 05, 2012 3:48 pm
by blog.brockha.us
Thanks Timbalu, adding this rewrite rule to the main .htaccess does the trick indeed.

If I want to do that in the plugins directory, this will be enough (anything else will be inherited from the main directory)?

Code: Select all

RewriteEngine On
RewriteRule ^(.*/documentation([0-9a-z\.\_\+]+)\.html?)$ - [L]
It works, too, having this in the plugins directory, but as i am no htaccess expert, I'm a little worried, that this will open something else. So: Is it enough having only these two lines in the plugins .htaccess?

Re: Plugin Documentation can't be loaded

Posted: Sun Feb 05, 2012 4:22 pm
by Timbalu
Well, nor me. I just did some try and error... :wink:

We need this for files called (/deep-inside/)documentation_(2-digit a-z).html. So my Rule can obviously get customized much more. I am not even sure what happens if you turn off mod_rewrite...

Re: Plugin Documentation can't be loaded

Posted: Sun Feb 05, 2012 6:00 pm
by blog.brockha.us
Hmm.. So we could produce this in spartacus when installing upgrading a plugin, right?

Re: Plugin Documentation can't be loaded

Posted: Sun Feb 05, 2012 6:03 pm
by Timbalu
Yes, if that is working inside the plugins dir, sure!
(I did not test it, but it sound you did)

Re: Plugin Documentation can't be loaded

Posted: Sun Aug 19, 2012 8:56 am
by Timbalu
@all and Grischa
I just remembered this case.... what about commiting this to the master and 2.0 branch?