Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-09-08 05:30:05
- metamezzo
- New Member
- From: yonder flodden wall
- Registered: 2010-09-04
- Posts: 5
Bad Request (Error 400) when copying or saving Pages - workaround
I know there was a previous discussion about this here: http://forum.textpattern.com/viewtopic.php?id=29880
That ended with getting Textpattern installed on a more ‘CMS friendly’ server.
But, if like me, you’re stuck with your web hosting provider, and you’ve tried all the steps in the above-linked discussion with no success, then perhaps the following may help:
1. Make sure it is a mod_security issue by checking your host’s error logs.
2. I checked mine and found that matching was being done against ‘<html’ and ‘<meta’ in the conf file.
3. I verified by removing the said tags in Textpattern’s ‘default’ page and doing a copy or save—both were successful and I was able to make copies/changes!
4. Use Textpattern variables to hide the ‘html’ and ‘meta’ tags.
The following worked for me (first 5 lines on every visible page):
<txp:variable name="my_h" value="h" />
<txp:variable name="my_m" value="m" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<<txp:variable name="my_h" />tml xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<<txp:variable name="my_m" />eta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I posted this in case someone else has the same problem, and, if there is a better approach than this, please post that alternative as well.
Cheers!
Offline
Re: Bad Request (Error 400) when copying or saving Pages - workaround
Would you mind telling us which hosting provider this is, because while your suggested workaround is very creative, people shouldn’t have to jump through hoops to be able to use a CMS.
Offline
#3 2010-09-08 20:01:57
- metamezzo
- New Member
- From: yonder flodden wall
- Registered: 2010-09-04
- Posts: 5
Re: Bad Request (Error 400) when copying or saving Pages - workaround
Promise I will say who my hosting provider is, but I won’t say who just now until I get their official answer. To be fair I need to give them a chance to provide me a solution we could both live with. It could simply be that mine’s their first Textpattern website.
Agree with your statement, and it’s precisely why I labelled this a *workaround*—it’s supposed to be temporary. Couldn’t wait for the official answer and I had to get the website up and running. Deadlines beckon!
Offline
#4 2010-09-09 15:55:53
- metamezzo
- New Member
- From: yonder flodden wall
- Registered: 2010-09-04
- Posts: 5
Re: Bad Request (Error 400) when copying or saving Pages - workaround
Happy ending: The mod_security rules were changed so now I don’t get ‘Bad Request’ errors and I don’t need the workaround any more. As promised, my provider is http://www.hostinghelper.co.uk/. They do help. So now back to work! :-)
Offline
Re: Bad Request (Error 400) when copying or saving Pages - workaround
metamezzo wrote:
. . .
1. Make sure it is a mod_security issue by checking your host’s error logs.
2. I checked mine and found that matching was being done against ‘<html’ and ‘<meta’ in the conf file.
This just happened to me. My web hosting company uploaded a php.ini file for me to alter so the necessary php functions would work in a fresh install, but then I discovered I could not post a form with the meta info at the top. I narrowed the culprits down to html and meta.
My solution was to log into my hosting account, go into phpMyAdmin and insert the unacceptable code there.
I’ll probably write to tech support to see what they can do about this issue, but if time is short, just post the offending code directly to the database.
Cheers,
Cliff
Offline