• Hi guys.

    I seem to have stumbled upon a strange issue that I can’t wrap my head around. WordPress will throw a 404 error whenever I include a < character inside the post content (like an <h2> tag). On both posts and pages.

    I have tried:

    – disabling all plugins
    – changing the theme
    – replacing all wordpress files
    – switching php versions in cPanel

    The .htaccess file is default.
    //edit: everything is updated

    Any ideas?

    • This topic was modified 8 years, 1 month ago by DomenLo. Reason: //edit: everything is updated
Viewing 15 replies - 1 through 15 (of 15 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Where does the 404 page appear?

    Thread Starter DomenLo

    (@domenlo)

    It appears when I click on the publish/update button. “Error 404 – page not found” on wp-admin/post.php (file is there of course)

    The post can include only the single < character (and nothing else) and it will throw the error.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Is the post also published on the front-end?

    Thread Starter DomenLo

    (@domenlo)

    No, the post or change does not get published. Even if i click on “save draft” it goes to the 404 error.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you have access to your site’s error logs? You might get more informative errors in there

    I have the same issue like @domenlo .

    If U want i ill give the error log

    And also the problem from the WP Editor .

    Thread Starter DomenLo

    (@domenlo)

    I have error_log access (via cpanel), but it looks like it’s empty. I turned on the debug.log logging and all it logs is a deprecated issue regarding US_Widget_Contact.

    Notice: The called constructor method for WP_Widget in US_Widget_Contact is deprecated since version 4.3.0! Use __construct()

    Checked for updates, still on latest everything.

    I am checking Error log now and its also empty.

    Change “<” to “<” and see if it works.

    Thread Starter DomenLo

    (@domenlo)

    Not really useful, but here are two access logs, one with < and one without <

    when i include <

    MYIP – – [13/Oct/2016:10:44:53 +0200] “POST /wp-admin/post.php HTTP/1.1” 404 6603 “https://SITEURL/wp-admin/post.php?post=3975&action=edit&#8221; “BROWSERAGENT”

    When i dont include <

    MYIP – – [13/Oct/2016:10:44:06 +0200] “POST /wp-admin/post.php HTTP/1.1” 302 229 “https://SITEURL/wp-admin/post.php?post=3975&action=edit&#8221; “BROWSERAGENT”

    Thread Starter DomenLo

    (@domenlo)

    @rtwk I’m guessing your code got cleaned up in some way, seems to be same character (the “less than” character in HTML)

    • This reply was modified 8 years, 1 month ago by DomenLo.

    Its Problem may be related on hosting platformd, Because some of my wordpress website working smoothly on the rhcloud (OpenShift) hosting and also the problem with my namescheep hosting wordpress websites.

    If u got any solutions/ tricks Please Notify here/me/ @domenlo , @anevins

    @domenlo, yeah. What I meant is to use HTML entity for “<“.

    The form data is that

    _wpnonce:8ddd6e37b9
    _wp_http_referer:/wp-admin/post-new.php?post_type=page&lang=en&wp-post-new-reload=true
    user_ID:1
    action:editpost
    originalaction:editpost
    post_author:1
    post_type:page
    original_post_status:auto-draft
    referredby:
    _wp_original_http_referer:
    auto_draft:
    post_ID:121
    meta-box-order-nonce:7e020987eb
    closedpostboxesnonce:3559f7772b
    post_title:Hi
    samplepermalinknonce:127f71986b
    content:hi
    wp-preview:
    hidden_post_status:draft
    post_status:draft
    hidden_post_password:
    hidden_post_visibility:public
    visibility:public
    post_password:
    mm:10
    jj:13
    aa:2016
    hh:13
    mn:37
    ss:19
    hidden_mm:10
    cur_mm:10
    hidden_jj:13
    cur_jj:13
    hidden_aa:2016
    cur_aa:2016
    hidden_hh:13
    cur_hh:13
    hidden_mn:37
    cur_mn:37
    original_publish:Publish
    publish:Publish
    parent_id:
    menu_order:0
    _thumbnail_id:-1
    metakeyselect:#NONE#
    metakeyinput:
    metavalue:
    _ajax_nonce-add-meta:b09d872489
    advanced_view:1
    post_name:
    post_author_override:1

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WordPress Throws 404 Error When I Include “<" Character’ is closed to new replies.