Widget Settings Importer/Exporter
[resolved] 404 on import on in test environment (3 posts)

  1. jessedyck
    Posted 2 years ago #

    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.


  2. jessedyck
    Posted 2 years ago #

    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.

  3. Kevin Langley
    Plugin Author

    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Widget Settings Importer/Exporter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.