For some strange reason I am unable to edit the ContactForm snippet. I have no problem with any other.
When I try to save the ContactForm, the Manage resources frame is replaced with
[tt]Not Found
The requested URL /manager/index.php was not found on this server.[/tt]
So I Thought I would be clever and create a new snippet and copy the code from the original ContactForm. I created a new sippet called NewContactForm, added a few lines of code and saved it. Then I re-opened it and pasted the code from the original ContactForm snippet. After clicking Save, I saw a momentarty "Saving, please wait". Then the frame was replaced by the same not found error.
No matter what I do, I am unable to save either the original ContactForm Snippet under its original name or a new one. And I am unable to save a modified version either as a new snippet or as the original one.
I have gone through every other snippet and successfully saved every one. It is ONLY ContactForm where I have a problem.
Has anyone else experienced the same problem? Why would this occur ONLY with the content of the ContactForm.
PHP 4.4.1
Apache 1.3.34
Linux 2.6.9
MODx 0.9.2.1 (rev 1005)
-
☆ A M B ☆
- 24,524 Posts
I also cannot save the eForm snippet on two of the sites that I have on one host, while they save just fine on other hosts. I think it has to do with some security settings on the host that detect strings that they don’t like in the POST of the page request, and block the request. You may be able to insert the snippet directly into the database using the sql client (usually phpMyAdmin) supplied by your host. I’m going to be moving my sites to a different host later this summer. Security is nice, but not when it gets so tight that I can’t even use the site!
My host has restriction on the servers that post data cannot contain "content-type" string.. I need to edit that out from the templates or snippets that have it. I’ve done a snippet what joins the content-type tag from two separate strings and use that in templates.
@nzkiwi: try to save the snippet by pasting few lines at a time and see on what line the error appears.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
-
☆ A M B ☆
- 24,524 Posts
In the case of eForm, the comment
# Same as &email but for Cc:
(getting rid of the : after the Cc fixed this)
and the code
cc => isset($cc)? $cc:"",
are what is getting blocked. Adding a space between the $cc and the : solved the second case.
I would suppose the similar bcc comment and code would cause the same problem, I didn’t test them, just changed them.
Try to contact your host and ask what restrictions they are using and if they have any suggestions for you.
You could try replacing the @ character in the line 99 with ".chr(64)." (including the quotemarks). The line at 42 is a php comment (// at the start of the line ), you can just remove that line.
But if it’s the @ character that’s causing this, it would be odd that the other lines you posted didn’t cause errors..
You can also get the snippet working by putting the snippet code straight to the database, if you have some way to access the database. Or you could make it a separate file in the filesystem and use php include() to include the file in snippet code.
EDIT, changed "chr(64)" to ".chr(64)."
"He can have a lollipop any time he wants to. That's what it means to be a programmer."