Home Forums WordPress Plugins Hide My WP Conflict with Instant Images Plugin – Problem related to WP Rest API

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22623
    virgodesign
    Active
    Post count: 11

    Hi,

    I’ve found a problem using hide_my_wp (v5.5.6) toghether with instant images plugin (v3.3.1).
    I’m using the latest wordpress version (4.9.7) in multisite mode.
    Hide_my_wp is network enabled and I’ve changed the /wp-content url into /content, from Hide_my_wp settings page.

    I suspect that the problem could be related to the use of WP Rest API more than a simple conflict with instant images plugin.

    Instant Images is a plugin that let users import images from unsplash.com directly into the wordpress media library.
    the plugin link is https://wordpress.org/plugins/instant-images/

    This plugins uses WP Rest API to import, resize, and move images into media library.

    The problem is that during the import process the file path is processed by hide_my_wp and changes from
    /public_html/wp-content/uploads/sites/2/instant-images/
    /public_html/content/uploads/sites/2/instant-images/
    and the process fails when the images is moved into meda library.

    Taking look at the plugin’s code it seems that the rewrite happens during a wp_send_json function located into
    /instant-images/api/upload.php

    Reproducing the error is very simple

    1. Activate hide_my_wp and change /wp-content into /content
    2. Download and activate Instant Images plugin.
    3. From the Dashboard, go to instant images settings page and try to import an image

    The import will failed and the browser console will show some warnings. Here you can se any post request where the file path appears modified.

    Thanks in advance.

    • This topic was modified 6 years, 5 months ago by virgodesign.
    • This topic was modified 6 years, 5 months ago by virgodesign.
    Attachments:
    You must be logged in to view attached files.
    #22632
    Suman M.
    Post count: 12478

    Hi, please do these:

    – in General settings tab disable/uncheck “Directory List” and “Hide PHP Files” options

    – in Permalinks & URLs tab, empty out “Ajax URL” field. Also empty out “API Base” and “API Query” fields (“API” option should be set to Enabled)

    – if still the issue then try disabling “IDS” option in IDS Firewall tab.

    Let us know. Thanks!

    #22634
    virgodesign
    Active
    Post count: 11

    Hi Suman,
    thanks for the reply.

    “Directory List”, “Hide PHP Files” and “IDS” options has been always disabled.
    I’ve tried removing Ajax URL (that was “ajax”) and API Query ( that was “rest_route”) but the problem still persists.

    #22639
    Suman M.
    Post count: 12478

    Hi, can you please let us know your site’s wp-admin login details as private reply so that we can look into the issue further.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.