• Resolved Matt Bernhardt

    (@morphosis7)


    When importing a .wie file, I’m getting an error screen with the message “You must upload a .wie file generated by this plugin.”

    What I’m trying to do is export/import widgets so that I can transition between themes as quickly as possible. The site in question is on a multi-site network (the overall network composes about 15 sites).

    The site is relatively small, with five widgets. One is a very straightforward Text widget, another is an RSS feed, and three others use the visual editor provided by BlackStudio TinyMCE. I believe they all use the Widget Context and Widget CSS Classes plugins to target specific pages on the site.

    I’ve tried simply exporting the .wie file using this plugin, switching the site to the new theme, and importing the .wie file using this plugin. No luck.

    I then tried (after seeing other bug reports here) disabling as many plugins as I can (some are enabled at the network level: EmbedIt Pro, Media Library Assistant, W3 Total Cache, and the WP REST API v1 – these are all still active). The original .wie file again fails to import.

    My next step was to re-export the .wie file, and re-import _that_ file. Again, the same error message. It should be noted here that at this point I’m only dealing with two out of the original five widgets, as three disappeared when I disabled the site-specific plugins.

    Any recommendations about what steps I should follow would be very helpful. I’m using version 1.2.4 of this plugin. I’m probably not going to be able to disable the network-level plugins, as that risks disrupting other sites on the network.

    A final note – the site I’m discussing here is running on my localhost while I work out what processes I need for when the real transition happens in production. If you want to see the site I’m talking about in production, visit libraries [dot] mit [dot] edu [slash] giving

    https://www.ads-software.com/plugins/widget-importer-exporter/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Steven Gliebe

    (@stevengliebe)

    The plugin should only show that error if the .wie file is:

    a) Missing the .wie extension
    b) Not uploaded (submit without choosing file)

    Can you please check these two things?

    Otherwise, since you cannot deactivate network plugins, can you make a fresh install of WordPress and test importing the same .wie file there? This should help narrow down the problem to either the site or the file.

    If all else fails, send me an email with the .wie file attached and I’ll check it out (find my email at https://stevengliebe.com).

    Thread Starter Matt Bernhardt

    (@morphosis7)

    Yes, the file has the .wie extension. The full name is “wordpress-giving-widgets.wie” as downloaded. And yes, I remembered to upload the file using the “Choose File” button. I don’t see a way to easily post a screenshot.

    I’ll email the file momentarily, but for the sake of posterity I’ve also posted it as a GitHub Gist: https://gist.github.com/matt-bernhardt/e9544d740bd7b687e8f220ca99d98772 . There are two revisions there, the first is the minified file as downloaded (with five widgets, so still using the all the plugins). The second version was de-minified using JSONlint – but that is for readability only. The version I’ve uploaded is the originally-downloaded version.

    Thread Starter Matt Bernhardt

    (@morphosis7)

    I was able to import the .wie file after disabling all the network-level plugins on my local server. It appears that the widgets provided by disabled plugins are not imported however, nor are settings provided by disabled plugins?

    This is tricky to move forward, if this is the case. In order to successfully transfer the widgets, I need to identify which plugins provide all the settings – and hope that none of them are the ones that prevented the original import from happening.

    My next steps are going to be to delete the widgets and re-run the import with each plugin enabled – to try and identify which network-level plugin(s) caused the problem.

    Thread Starter Matt Bernhardt

    (@morphosis7)

    Enabling the network-level plugins one at a time seems to indicate that the issue is with Media Library Assistant ( https://www.ads-software.com/plugins/media-library-assistant/ ). The import happened without incident with the other four enabled, but as soon as that was added to the mix, I got the error message.

    I’m still looking to see if other plugins on our network are also the problem, or just this one.

    Plugin Author Steven Gliebe

    (@stevengliebe)

    It appears that the widgets provided by disabled plugins are not imported however, nor are settings provided by disabled plugins?

    That’s right. It can’t import widgets that are not registered by an active plugin or theme.

    seems to indicate that the issue is with Media Library Assistant

    Widget Importer & Exporter uses WordPress’s upload_mimes filter to allow uploading .wie files. It checks the upload for that type with wp_match_mime_types() and if false it gives the error you are seeing.

    https://github.com/stevengliebe/widget-importer-exporter/blob/master/includes/import.php#L32

    https://github.com/stevengliebe/widget-importer-exporter/blob/master/includes/mime-types.php

    I’m reading that Media Library Assistant gives “control over Post MIME Types, File Upload extensions/MIME Types” so my assumption is that its feature for this is nullifying what Widget Importer & Exporter is doing to add its own mime type. So, try using that plugin’s feature for adding mime types to add a mime type for the .wie extension as application/json.

    Thread Starter Matt Bernhardt

    (@morphosis7)

    Great! I’ll look into that as an option. Thanks for all your help so far.

    Thread Starter Matt Bernhardt

    (@morphosis7)

    That worked! Adding the .wie file extension as application/json to Media Library Assistant allows the upload and import to proceed correctly with all plugins enabled.

    Thanks for all your help – I’m marking this as resolved at this point.

    Plugin Author Steven Gliebe

    (@stevengliebe)

    I’m glad I could help. Thanks for confirming the solution.

    I wish I knew what to do with a GitHub URL…

    Hi
    When importing a .wie file, I’m getting an error screen with the message “You must upload a .wie file generated by this plugin.
    What i should i do? I need a help

    Plugin Author Steven Gliebe

    (@stevengliebe)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘You must upload a .wie file generated by this plugin.’ is closed to new replies.