WordPress.org

Support

Support » Plugins and Hacks » Widget Settings Importer/Exporter » [Resolved] 404 on import on in test environment

[Resolved] 404 on import on in test environment

  • This is going to be an edge-case, and I know what I’m doing will probably cause me many problems; but, here it is anyway.

    Import is failing because (I suspect) it’s looking for the file via the absolute path, which in my case means its going out to the internet to get the file, and it doesn’t exist in the internet. Here’s why.

    I have a shared host set up on a specific host name. I’m not yet ready to cut over the DNS to the new host, so I’m accessing it from my machine by changing my HOSTS file. When I try to import, I see:

    Warning: file_get_contents(http://domain.com/wp-content/uploads/2013/02/widget_data.json) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/user/wp-content/plugins/widget-settings-importexport/widget-data.php on line 401

    My assumption is, that this is because the plugin is looking for the file by resolving the domain on the server, which will point it back to my existing host, so the file indeed does not exist. If it was working off a server relative path, I don’t expect this to be a problem.

    http://wordpress.org/extend/plugins/widget-settings-importexport/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Actually, it was as simple as changing lines 401 and 402.

    From: $widget_settings[‘url’]

    To: $widget_settings[‘file’]

    Seems to work so far. It found the file at least.

    Plugin Author Kevin Langley

    @kevinlangleyjr

    I’m glad you were able to answer your own issue with the plugin. Unfortunately, since this is an edge case as you had said, I will not be integrating this into future versions of the plugin.

    I’m going to be marking this topic as resolved, but if you need further assistance, feel free to open another.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] 404 on import on in test environment’ is closed to new replies.
Skip to toolbar