• Hi there,
    thanks for the great plugin.

    I would like to report an issue however.

    Problems arise from the use of json_encode() and json_decode(). Specifically, a widget that I’ve built makes use of an array of arrays to store repeating fields. This doesn’t really play nice with json_decode() as it recreates the data as an array of stdClass objects instead, generating fatal errors when trying to access the data as an array. As a result, the widgets screen breaks and there is no way to remove the offending widget.
    Use of serialize() and unserialize() would be more appropriate as they restore the data to their original data types, however I understand that it’s not a simple matter of changing that now (for back-compat reasons), and you might also have your reasons for doing it the way you did.

    A possible solution would be, taking everything I can think of into account, adding a second export and import option, perhaps with a different extension, that utilizes serialize() and unserialize() instead?

    For now, the only workaround I can see, is hooking into the wie_unencoded_export_data and wie_before_import filters, encoding the data in a format that can be properly decoded, without being affected by the json functions. This however, will make the .wie files produced incompatible with other installations.

    I’d really love to hear your take on this.

    Regards,
    Anastis Sourgoutsidis

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

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem with array of arrays’ is closed to new replies.