Plugin Documentation can't be loaded

Creating and modifying plugins.
Post Reply
User avatar
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Plugin Documentation can't be loaded

Post by blog.brockha.us » Fri Feb 03, 2012 2:31 pm

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) :?:
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Plugin Documentation can't be loaded

Post by Timbalu » Fri Feb 03, 2012 4:53 pm

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]

Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Plugin Documentation can't be loaded

Post by garvinhicking » Fri Feb 03, 2012 5:05 pm

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...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Plugin Documentation can't be loaded

Post by Timbalu » Fri Feb 03, 2012 5:14 pm

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?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Plugin Documentation can't be loaded

Post by blog.brockha.us » Sun Feb 05, 2012 4:48 pm

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?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Plugin Documentation can't be loaded

Post by Timbalu » Sun Feb 05, 2012 5:22 pm

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...
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
blog.brockha.us
Regular
Posts: 695
Joined: Tue Jul 03, 2007 3:34 am
Location: Berlin, Germany
Contact:

Re: Plugin Documentation can't be loaded

Post by blog.brockha.us » Sun Feb 05, 2012 7:00 pm

Hmm.. So we could produce this in spartacus when installing upgrading a plugin, right?
- Grischa Brockhaus - http://blog.brockha.us
- Want to make me happy? http://wishes.brockha.us/

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Plugin Documentation can't be loaded

Post by Timbalu » Sun Feb 05, 2012 7:03 pm

Yes, if that is working inside the plugins dir, sure!
(I did not test it, but it sound you did)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Plugin Documentation can't be loaded

Post by Timbalu » Sun Aug 19, 2012 8:56 am

@all and Grischa
I just remembered this case.... what about commiting this to the master and 2.0 branch?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

Post Reply