Skip to content

Broken import with One Click Demo Import plugin #11927

@capuderg

Description

@capuderg

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest stable version of Elementor.

Description

In version v2.6.0 of the One Click Demo Import plugin (OCDI) we followed the steps of the WP importer (v0.7+) and properly wp_slashed the post meta data before importing. We are using a fork of the "new WP importer" as the content importer.

Your plugin hooks to one of the importer's filters: wxr_importer.pre_process.post_meta in the Compatibility class and this hook uses the wp_slash on already wp_slashed data which breaks the import.

We've released OCDI version 2.6.1, with a hotfix, which removes the above filter hook, before executing the import. This is probably not an ideal solution.

Would it be possible, to add a check to the above hook function in your Compatibility class and skip the additional wp_slash on the post meta value if our plugin is in use? Something similar to what you did with the WP importer v0.7 here: https://github.com/elementor/elementor/pull/11484/files , but in the on_wxr_importer_pre_process_post_meta method.

Steps to reproduce

  1. Install and activate Elementor and One Click Demo Import (v2.6.0) plugins (version 2.6.1 already works OK with Elementor, because of the not ideal hotfix).
  2. Try to import some Elementor content by going to Appearance -> Import Demo Data and uploading an XML file with Elementor pages exported from WP (default WP export functionality).
  3. The imported content will be broken after the import is finished

Isolating the problem

  • This bug happens with only Elementor plugin active (and Elementor Pro).
  • This bug happens with a default WordPress theme active.
  • I can reproduce this bug consistently using the steps above.

Environment

Not an environment-specific issue (it's a compatibility issue).

Thank you for your time! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility/3rd-partyIndicates a compatibility problem with a 3rd-party plugin or theme.status/mergedIndicates when a Pull Request has been merged to a Release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions