• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: CMSMS 1.10 Beta3: When MicroTiny doesn't load...
PostPosted: Wed Sep 21, 2011 10:14 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Jul 27, 2008 1:36 am
Posts: 218
Location: USA
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:
# 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:
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMS 1.10 Beta3: When MicroTiny doesn't load...
PostPosted: Tue Oct 11, 2011 10:08 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Jul 27, 2008 1:36 am
Posts: 218
Location: USA
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):

Quote:
# 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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CMSMS 1.10 Beta3: When MicroTiny doesn't load...
PostPosted: Tue Oct 11, 2011 10:47 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7959
Location: Fernie British Columbia, Canada
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting