Support » Fixing WordPress » Post fails to publish/save if contains the word “alert”

  • mikepch

    (@mikepch)


    My posts will fail to publish or save if they contain the word “alert.” I understand that this word is a reserved word, but is there any way around this aside from having to break out my thesaurus and avoid the term altogether?

    I’ve found similar solutions (some dating back to 2005) that say to modify my .htaccess file to conditionally disable mod_security, but I don’t even have that installed on Apache.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter mikepch

    (@mikepch)

    Further testing shows:

    The word “alert” is allowed when creating new posts, and when editing those posts. But it will fail on older posts, and truncate part of the text of that post when it encounters the problem.

    Thread Starter mikepch

    (@mikepch)

    Bump.

    I’ve also discovered that posts will fail to publish/save if they contain the word “replace.”

    Anyone know how to stop WordPress/PHP/Apache from trying to execute the content of my posts and just accept them as literal values?

    Thread Starter mikepch

    (@mikepch)

    I should also note that I don’t have mod_security installed, so any potential solutions that involve disabling that don’t apply.

    This is really aggravating!

    andrewski

    (@andrewski)

    Are you using WordPress 2.7.1?
    Which versions of Apache/PHP?
    Which WordPress plugins are you using?
    Could you disable them? Can you
    What happens when you Publish such a post? Do you get a blank page or does it return any kind of an error?

    Thread Starter mikepch

    (@mikepch)

    Ubuntu 8.04.2
    WordPress 2.7.1
    Apache 2.2.8
    PHP 5.2.4

    Its a completely fresh install as of last week.

    No non-default Apache mods installed. Mod_Security isn’t installed.

    Only WP plugins installed are AudioPlayer, Mobile Press, Sociable, Ultimate Google Analytics. I’ve tested with all disabled, and I still get the same thing.

    andrewski

    (@andrewski)

    What do you see in the Apache and PHP logs?

    andrewski

    (@andrewski)

    Can you

    My trailed off question above was going to be, “Can you test with the default WordPress theme?”

    Thread Starter mikepch

    (@mikepch)

    It happens on the default theme as well.

    andrewski

    (@andrewski)

    I’m still curious about the logs, but in the meantime:
    Could it be an encoding problem? Pasting from Notepad could be a workaround.
    Also, I’m assuming you’ve tried different browsers?
    And I know mod_security isn’t enabled, but have you tried disabling it in Apache’s configuration as per the Ubuntu Server Guide? And what does your .htaccess look like?

    Thread Starter mikepch

    (@mikepch)

    We already tested to see if it was an encoding issue caused by curly quotes and curly apostrophes and ellipse characters and such. Even after replaced with standard characters, the problem persisted. We’ve narrowed it down to what seem to be system reserved words.

    As for the logs and content of the .htaccess file, I’ll have to dig into that when I get a chance and get back to you.

    andrewski

    (@andrewski)

    Hm, I don’t know how your test environment compares with the live blog, but there’s a lot of Javascript in the blog’s source, and I’d wonder if that might be affecting it also. I don’t know about replace, but I think alert is a reserved word in JS.

    I’m having a similar issue with the word “Offset”.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Post fails to publish/save if contains the word “alert”’ is closed to new replies.