CMSMS 1.10 Beta3: When MicroTiny doesn't load...

A place to report and discuss issues with the CMSMS 1.10 beta.
Locked
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

CMSMS 1.10 Beta3: When MicroTiny doesn't load...

Post by fredp »

Hi,

I tried a new 1.10-beta3 install on a different server with its own SSL cert. This time, however, I had a hard time getting MicroTiny to start-up for content textareas. I just found the "problem" and thought that, while technically it may not be a bug, at the very least, it should be mentioned in the 1.10 release notes. That said... there is a simple code change that would make this a non-issue. More on that after a description of the problem...

It seems that MicroTiny init. code is cached in /tmp/cache in files with names that match this regex: '^mt_[0-9a-z]{32}$'. Such names are a problem if you happen to use a particular mod_rewrite rule taken from doc/htaccess.txt:

Code: Select all

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Since these filenames don't contain a dot, the rule fires -- ultimately resulting in failed GET requests. For example:

Code: Select all

GET /tmp/cache/mt_0f3d9d7e1635a606aa639e5d24f0575b?t=1316595595 HTTP/1.1
...
HTTP/1.1 301 Moved Permanently
...
GET /tmp/cache/mt_0f3d9d7e1635a606aa639e5d24f0575b/?t=1316595595 HTTP/1.1
...
HTTP/1.1 404 Not Found
Of course, this would be a non-issue if someone were to change these filenames to include a dot. For example, maybe replace the underscore character with a dot... Just a thought. ;)

There is another issue related to this test case, but I'll create a separate post for it so that it can be tracked separately.

Hope this helps,
Fred P.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am
Location: USA

Re: CMSMS 1.10 Beta3: When MicroTiny doesn't load...

Post by fredp »

Update:
I found a temporary workaround for the case where MicroTiny doesn't load if you have the "301 Redirect all requests that don't contain a dot or trailing slash..." mod_rewrite rule (from doc/htaccess.txt) enabled. It appears to work on CMSMS 1.10-beta4.

I really don't like this kind of workaround, as it depends on MicroTiny's internal file naming conventions--bletch!!! That said, perhaps it might help as a *temporary* solution until a better alternative comes along.

Workaround : add additional RewriteCond line to the aforementioned RewriteRule in .htaccess (below in red):
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
# Workaround--WARNING: Relies on MicroTiny implementation *USE AT YOUR OWN RISK*
RewriteCond %{REQUEST_URI} !/tmp/cache/mt_[0-9a-z]{32}$
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: CMSMS 1.10 Beta3: When MicroTiny doesn't load...

Post by calguy1000 »

Fixed in svn.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Locked

Return to “[locked] CMSMS 1.10 Beta”