• Resolved Wasca

    (@wasca)


    Hi Guys

    We created some custom in-house code that makes use of the WP-API.

    When we try to delete a custom category using a link like this

    DELETE /wp-json/wp/v2/customcategory/102?oauth_consumer_key=xxx&oauth_nonce=xxx&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1480392600&oauth_token=xxx&oauth_token_secret=xxx&oauth_signature=xxx HTTP/1.1″ 200 1406 “-” “-”

    The delete fails. When we turn off the 6G Rules and turn on the 5G Rules it works and the category is deleted.

    Just wondering if there is anything that can be done so we can use the 6G rule set while still being able to make use of the WP-API

    Thanks

    • This topic was modified 9 years, 6 months ago by Wasca.
    • This topic was modified 9 years, 6 months ago by Wasca.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter Wasca

    (@wasca)

    Looked a little more into the 6G Rule set, this is the offending lines.

    # 6G:[REQUEST METHOD]
    <IfModule mod_rewrite.c>
    	RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|put|trace|track) [NC]
    	RewriteRule .* - [F]
    </IfModule>

    Looks like I might need to approach Perishable Press

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Looks like I might need to approach Perishable Press

    Yes talk to him since he wrote those rules and see what he says and let us know.

    Thread Starter Wasca

    (@wasca)

    Got a reply back from Perishable Press.

    Thanks for reporting this. You should be able to remove “delete” from the condition to resolve the issue. So this:

    RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|put|trace|track) [NC]

    Would become this:

    RewriteCond %{REQUEST_METHOD} ^(connect|debug|move|put|trace|track) [NC]

    I will update the 6G later today.

    When would we see this change in your plugin?

    Plugin Contributor mbrsolution

    (@mbrsolution)

    @wasca, go to WP Security -> Firewall -> Basic Firewall Rules and use this feature to enable a customize version of the entry you mentioned above. Make sure you remove the word delete from the condition as per instructions.

    The above should fix your issue. There is no need to update the plugin with a fix. That is why the customize rules feature was added to the plugin to help those that need to make some modifications.

    Let me know if you need more help.

    Regards

    • This reply was modified 9 years, 6 months ago by mbrsolution.
    Thread Starter Wasca

    (@wasca)

    @mbrsolution

    Thanks for your suggestion. If I do this it will append my entry to the .htaccess file, however, because I still want to use all the other 6G Rules the old rule will still exist in .htaccess file.

    So should I just turn off the 6G Rule option and paste in the full 6G Rules into the custom area which will include my amendment?

    BTW – Perishable Press have updated the rule set now with my fix.
    https://perishablepress.com/6g/

    • This reply was modified 9 years, 6 months ago by Wasca.
    Plugin Contributor mbrsolution

    (@mbrsolution)

    @wasca in regards to your comment.

    So should I just turn off the 6G Rule option and paste in the full 6G Rules into the custom area which will include my amendment?

    Yes, that is correct. You paste the whole 6G rule and remove the word delete into the custom rules area.

    Great news that Perishable have updated the rule with your fix šŸ˜‰

    You can mark this support as resolved if you don’t need any more help.

    Regards

    Thread Starter Wasca

    (@wasca)

    Hi Guys

    Just wondering when your plugin will be updated to use the latest version of the 6G ruleset on this page. https://perishablepress.com/6g/

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, what is included in the latest version, if you don’t mind me asking?

    Thread Starter Wasca

    (@wasca)

    @mbrsolution

    I’d been in contact with producer of the list (Jeff Starr) about an issue I saw as per my above posts. The code has been updated since then to accommodate the issue I was seeing.

    I was just wondering if this plugin was going to be updated to use the officially updated code.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Thank you for reporting back. The plugin developers will investigate further your suggestion/request.

    Regards

    Plugin Contributor wpsolutions

    (@wpsolutions)

    Thanks. Yes i will update the code for next release

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

The topic ‘Using WP-API with 6G Rules’ is closed to new replies.