• Resolved Imagebasdebruin

    (@basdebruin)


    I have one (of many) snippet that throws a 404 error on saving the snippet. Tried to export/import and clone it but the new (cloned or imported) snippets are suffering from the same 404 error on save.

    Also imported the snippet to another site and get the same 404 when saving.

    Other snippets can be edited and saved just fine

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Imagebasdebruin

    (@basdebruin)

    To my big surprise: when I deleted this comment block:

    /************************************************************************************************************************************************************
    * Name:			wpforms_execute
    * Arguments:	$fields, $entry, $form_data, $entry_id from WPForms action hook
    * Returns:		None
    * Function:		Depending on the FormID [constants defined in wp-config.php]- adds a bid / executes selection action on bid / sets guest users for bid 
    *************************************************************************************************************************************************************/

    The snippet can be saved. Maybe there is a hidden character in the block.

    Thread Starter Imagebasdebruin

    (@basdebruin)

    It is actually the word wp-config.php which throws the 404 error at saving. Even when it is just comment.

    Somebody is a little too serious about security 🙂

    Plugin Author ImageShea Bunge

    (@bungeshea)

    Huh, this seems quite strange.

    Code Snippets does not include this sort of security feature – perhaps there is some software installed on your host, or a different plugin, which is filtering HTTP request data and blocking requests including wp-config.php as a phrase?

    Thread Starter Imagebasdebruin

    (@basdebruin)

    Hi Shea,

    Thank you for your response. I created a staging site to be able to test without any other plugin activated. Basically an empty WP site with code snippets active. As soon as I insert the phrase wp-config.php the 404 is thrown during save.

    Maybe it is a WP internal security feature, but it does not come from my other plugins.

    Anyhow: it is working for me now and I love to use Code Snippets.

    Plugin Author ImageShea Bunge

    (@bungeshea)

    Thank you for all your extra testing, it makes problems like this much more easier to figure out.

    If it’s not from a plugin, then the next place to check would be server settings – especially if your staging site is running on the same server as your other site. There were some issues with 404 errors upon saving a while back, which was caused by certain settings in Apache’s mod_security module. Perhaps something similar could be happening here?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘404 error on saving specific snippet’ is closed to new replies.