• Resolved mondendev

    (@mondendev)


    How do I export media?

    You mention .xml, widgets, customizer and Redux but how to export ACTUAL images, videos, audio, pdf… the MEDIA?

    The tools > export DOESN’T export media (no matter what I select).

    You seem to be operating under the assumption that we are completely aware of a possible extra step(s) regarding this, since you’re failing to mention it in your guide where you lead us to believe that exporting the .xml will ‘export content’.

    When I export the .xml file, I get a 800KB file, and my content is at least 50MB.

    So please, can you say how do we actually export the content that will be imported by your plugin? If this is not possible wouldn’t you think it’s fair to mention it on your plugin page before we invest our time in it?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mondendev,

    the media is exported in the XML file when you use the “Tools > Export”. You have to select the option “All Content”. The media files are not actually exported at this point. They are only referenced by their public URLs in the XML file.

    When a user is importing your configured theme demo, these media URLs are used to download the file on the new WP site. That’s how the media files are imported.

    Have a nice day!

    Thread Starter mondendev

    (@mondendev)

    Thank you for a quick reply. So, if I’m understanding correctly, I must have all those assets live (either on a live version of my theme or I can copy/paste my “uploads” folder to some location and swap the URLs in the .xml with URLs from that location)?

    If this is correct, you should definitely include it guide. I was pulling my hair for hours, especially since tools > export has the option to export ‘media’ which, you guessed it, doesn’t export media.

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mondendev,

    yes, that’s correct. These media files referenced in the XML file have to be publicly accessible so that any importing WP site can download them. You can move them, but make sure the URLs in the XML file are updated. You should also run a test import after you do that, just to make sure all media files are importing OK.

    I’ve also added a new paragraph in our docs.

    Have a nice day!

    Thread Starter mondendev

    (@mondendev)

    Hi @capuderg,

    Thank you for sorting this out for me and for adding the paragraph in the documentation, that’s awesome!

    I have run a couple of imports and media gets imported properly. But have issues with

    • widgets: not imported.
    • Menu: doesn’t get assigned to its location and there’s a weird result on live preview – different HTML markup e.g. “menu-item
    • has a class “page_item” (but it goes to normal once I manually assign the Main Menu to its location).
    • Elementor: I think it’s on their side, but reporting anyway: “Background Overlay” gradient option doesn’t get imported (first color is not set and second one is wrong(red))

    No errors are reported, successful import is reported.

    If you have any pointers regarding assigning Menu to location after import and Widgets Import I’d appreciate it very much (I know I’m going off-topic).

    P.S. The links in the menus (and I guess all other URLs) point to my localhost project. Why does the plugin not change those URLs to correct ones (to match the project of the person who’s installing the demos)?

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mondendev,

    for the P.S. question… Are you using custom links for your menu items? If so, then those URLs won’t be updated. If you used the page/post/category items in the menu, then the URLs should update to the importing page URL.

    With “widgets: not imported”, did you export WIE file and configured it in the ocdi/import_files filter? Is the WIE file populated with serialized widgets data? Do any of the widgets import? Are the plugins that register the widgets installed before you import the widget?

    For the menu location assignment, please take a look at this section in our docs. There is an example code for the after import hook, which assigns a menu to a location.

    I don’t quite understand the “page_item” class issue, could you please explain in more detail?

    Take care!

    Thread Starter mondendev

    (@mondendev)

    I fixed the menu issue (didn’t put in the proper name). Now it’s only the widgets that I’d need some help with and I think I can handle Elementor and localhost URLs in the menu on my own.

    Thread Starter mondendev

    (@mondendev)

    Hi @capuderg,

    Shame on me, I didn’t change ‘widgets.json’ to my .wie file (homer sound).

    As for the menu, in short – it’s OK now. Long version: I named the menu “Main Menu” in register_nav_menus and named the actual menu in WP Admin “Main Menu (demo)“. And when I set it up in ocdi/after_import, and I used the register_nav_menus name, the result was it literally picked up the second sub-menu and only and the HTML was completely different than standard WP generated menu html (and, weirdly enough, it an actual HTML menu, but all the classes were off, as if it was generated by some other menu walker or something). Using the WP Admin menu name fixed the problem.

    Thread Starter mondendev

    (@mondendev)

    @capuderg You take care as well and thanks again for the help!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mondendev,

    thank you and I hope all is OK now (except the Elemntor issue)?

    Have a nice day!

    Thread Starter mondendev

    (@mondendev)

    Hi @capuderg,

    Yes, it’s all OK. Elementor issue is still there but I guess it’s them who need to adjust to Tools > Export and not the other way around?

    This is hopefully my last two questions, I already have a “Install Demos” admin page, is there a way I could insert your plugin there? And can I skip the “Recommended Plugins” part? (I already have a custom TGM based automatic plugin installation).

    Thanks and great plugin!

    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @mondendev,

    I’m sorry, but there is no way to skip the “Recommended Plugins” step. I would advise you to integrate your recommended plugins there with this documentation. It will provide your users with a better user experience.

    OCDI has to be on its own wp-admin page in order to load all the required dependencies and to work correctly. It can’t be added to an existing wp-admin page. If you really want to, you can move the page to another location in the wp-admin dashboard menu. Check out the last section on this docs page.

    Take care!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How To Export’ is closed to new replies.