One click demo import не работает

Содержание
  1. [RESOLVED] Error: OK (200) One Click Demo Import Issue #86
  2. Comments
  3. ahmadawais commented Feb 9, 2017
  4. capuderg commented Feb 9, 2017 •
  5. ahmadawais commented Feb 10, 2017
  6. ahmadawais commented Feb 10, 2017
  7. primozcigler commented Feb 10, 2017
  8. ahmadawais commented Feb 10, 2017
  9. capuderg commented Feb 10, 2017
  10. ahmadawais commented Feb 10, 2017
  11. Demo Import импортировать контент настройки темы WordPress
  12. WordPress.org
  13. Русский
  14. One Click Demo Import
  15. Описание
  16. Скриншоты
  17. Установка
  18. Часто задаваемые вопросы
  19. I have activated the plugin. Where is the «Import Demo Data» page?
  20. Where are the demo import files and the log files saved?
  21. How to predefine demo imports?
  22. How to automatically assign «Front page», «Posts page» and menu locations after the importer is done?
  23. What about using local import files (from theme folder)?
  24. How to handle different «after import setups» depending on which predefined import was selected?
  25. Can I add some code before the widgets get imported?
  26. How can I import via the WP-CLI?
  27. I’m a theme author and I want to change the plugin intro text, how can I do that?
  28. How to disable generation of smaller images (thumbnails) during the content import
  29. How to change the location, title and other parameters of the plugin page?
  30. How to do something before the content import executes?
  31. How can I enable the `customize_save*` wp action hooks in the customizer import?
  32. How can I pass Amazon S3 presigned URL’s (temporary links) as external files ?
  33. I can’t activate the plugin, because of a fatal error, what can I do?
  34. Issues with the import, that we can’t fix in the plugin
  35. Отзывы
  36. It works well
  37. Does it import elementor pages?
  38. The new update is mind-blowing 🙂
  39. after updation your plugin is not working.
  40. Just works
  41. Crashes site everytime
  42. Участники и разработчики
  43. Заинтересованы в разработке?
  44. Журнал изменений
Читайте также:  Загс не работает коронавирус

[RESOLVED] Error: OK (200) One Click Demo Import Issue #86

Comments

ahmadawais commented Feb 9, 2017

I tried OCDI for the first time and plan to use it with my latest premium theme. I configured it as it was written in the article, but on importing the demo both for files hosted locally, or remotely, I got this error.

Any insights about why is this happening?

My function looks like this.

The text was updated successfully, but these errors were encountered:

capuderg commented Feb 9, 2017 •

the setup above looks ok.

Do you have the log file in the Media section? What does the log file say?

Did you use the official plugin zip file: https://wordpress.org/plugins/one-click-demo-import/ ? Or did you download the zip file from GitHub?

Did the content actually import?

This is a strange issue, so I would really like to find out, what is causing it.

ahmadawais commented Feb 10, 2017

  1. I used the official plugin.
  2. No nothing got imported
  3. I am trying it out on localhost, but it should work, like my other solutions do (hint Radium OCDI)

ahmadawais commented Feb 10, 2017

I tried again on a server and first I got this error.

Some data was imported but not everything. E.g. customizer settings are not there, some are not all.

primozcigler commented Feb 10, 2017

Would it be possible that you send us your .xml, .dat and, .json files? It will be easier to debug on our end if we can replicate the problem. (You can send them privately to my email/tw as well if you want).

ahmadawais commented Feb 10, 2017

@primozcigler Can you guys point me to some demo files that I could import? That would rule out the possibility of an issue at your end. The demo ain’t ready yet so, I won’t be able to send it to you guys. I see how bad it looks. Still looking into it.

capuderg commented Feb 10, 2017

You can reference these files directly from my server, but let me know, once you are done with them, so I can delete them.

ahmadawais commented Feb 10, 2017

@capuderg OK, I was able to work through it and have my demos being imported. A few issues here and there. The only problem that I am left with is the meta for post types is not being imported, navigation is also not getting set. Is there some API of OCDI that I could use to call it back to my setup function? Also why would the page meta not be getting imported? Any insights on it.

Источник

Demo Import импортировать контент настройки темы WordPress

Привет! Мы продолжаем разбирать самые интересные и самые полезные плагины для сайта WordPress! Сегодня вы узнаете как импортировать на свой сайт контент, виджеты и настройки темы WordPress. Вы сможете перенести на свой сайт записи, страницы, изображения, виджеты, меню и другие настройки темы. Вы сможете импортировать настройки в XML файле, JSON файле, DAT файле. Очень простой и полезный плагин!

Установить плагин One Click Demo Import вы сможете прямо из админ-панели WordPress. Перейдите на страницу: Плагины — Добавить новый, введите название плагина в форму поиска, нажмите Enter, установите и активируйте плагин.

Далее, после установки и активации плагина, перейдите на страницу: Внешний вид — Import Demo Data. Здесь вы сможете импортировать настройки темы.

Далее, у вас будет три варианта для импорта настроек темы:

Choose a XML file for content import, выберите на своём компьютере XML файл для импорта контента темы.

Choose a WIE or JSON file for widget import, выберите на своём компьютере JSON файл для импорта контента темы.

Choose a DAT file for customizer import, выберите на своём компьютере DAT файл для импорта контента темы.

После загрузки файла, нажмите внизу на кнопку — Import Demo Data.

Дождитесь когда будут импортированы все данные, это может занять несколько минут.

Остались вопросы? Напиши комментарий! Удачи!

Источник

WordPress.org

Русский

One Click Demo Import

Описание

The best feature of this plugin is, that theme authors can define import files in their themes and so all you (the user of the theme) have to do is click on the «Import Demo Data» button.

Are you a theme author?

Setup One Click Demo Imports for your theme and your users will thank you for it!

Are you a theme user?

Contact the author of your theme and let them know about this plugin. Theme authors can make any theme compatible with this plugin in 15 minutes and make it much more user-friendly.

Пожалуйста, взгляните на наши документации плагина для получения дополнительной информации о том, как импортировать демонстрационный контент.

This plugin is using the modified version of the improved WP import 2.0 that is still in development and can be found here: https://github.com/humanmade/WordPress-Importer.

NOTE: There is no setting to «connect» authors from the demo import file to the existing users in your WP site (like there is in the original WP Importer plugin). All demo content will be imported under the current user.

Do you want to contribute?

Please refer to our official GitHub repository.

Скриншоты

  • Example of multiple predefined demo imports, that a user can choose from.
  • How the import page looks like, when only one demo import is predefined.
  • Example of how the import page looks like, when no demo imports are predefined a.k.a manual import.
  • How the Recommended & Required theme plugins step looks like, just before the import step.

Установка

From your WordPress dashboard

  1. Visit ‘Plugins > Add New’,
  2. Search for ‘One Click Demo Import’ and install the plugin,
  3. Activate ‘One Click Demo Import’ from your Plugins page.

From WordPress.org

  1. Download ‘One Click Demo Import’.
  2. Upload the ‘one-click-demo-import’ directory to your ‘/wp-content/plugins/’ directory, using your favorite method (ftp, sftp, scp, etc…)
  3. Activate ‘One Click Demo Import’ from your Plugins page.

Once the plugin is activated you will find the actual import page in: Appearance -> Import Demo Data.

Часто задаваемые вопросы

I have activated the plugin. Where is the «Import Demo Data» page?

You will find the import page in wp-admin -> Appearance -> Import Demo Data.

Where are the demo import files and the log files saved?

The files used in the demo import will be saved to the default WordPress uploads directory. An example of that directory would be: ../wp-content/uploads/2016/03/ .

The log file will also be registered in the wp-admin -> Media section, so you can access it easily.

How to predefine demo imports?

This question is for theme authors. To predefine demo imports, you just have to add the following code structure, with your own values to your theme (using the ocdi/import_files filter):

You can set content import, widgets, customizer and Redux framework import files. You can also define a preview image, which will be used only when multiple demo imports are defined, so that the user will see the difference between imports. Categories can be assigned to each demo import, so that they can be filtered easily. The preview URL will display the «Preview» button in the predefined demo item, which will open this URL in a new tab and user can view how the demo site looks like.

How to automatically assign «Front page», «Posts page» and menu locations after the importer is done?

You can do that, with the ocdi/after_import action hook. The code would look something like this:

What about using local import files (from theme folder)?

You have to use the same filter as in above example, but with a slightly different array keys: local_* . The values have to be absolute paths (not URLs) to your import files. To use local import files, that reside in your theme folder, please use the below code. Note: make sure your import files are readable!

How to handle different «after import setups» depending on which predefined import was selected?

This question might be asked by a theme author wanting to implement different after import setups for multiple predefined demo imports. Lets say we have predefined two demo imports with the following names: ‘Demo Import 1’ and ‘Demo Import 2’, the code for after import setup would be (using the ocdi/after_import filter):

Can I add some code before the widgets get imported?

Of course you can, use the ocdi/before_widgets_import action. You can also target different predefined demo imports like in the example above. Here is a simple example code of the ocdi/before_widgets_import action:

How can I import via the WP-CLI?

In the 2.4.0 version of this pugin we added two WP-CLI commands:

    wp ocdi list — Which will list any predefined demo imports currently active theme might have,

wp ocdi import — which has a few options that you can use to import the things you want (content/widgets/customizer/predefined demos). Let’s look at these options below.

wp ocdi import options:

wp ocdi import [—content=] [—widgets=] [—customizer=] [—predefined=]

—content= — will run the content import with the WP import file specified in the parameter,

  • —widgets= — will run the widgets import with the widgets import file specified in the parameter,
  • —customizer= — will run the customizer settings import with the customizer import file specified in the parameter,
  • —predefined= — will run the theme predefined import with the index of the predefined import in the parameter (you can use the wp ocdi list command to check which index is used for each predefined demo import)
  • The content, widgets and customizer options can be mixed and used at the same time. If the predefined option is set, then it will ignore all other options and import the predefined demo data.

    I’m a theme author and I want to change the plugin intro text, how can I do that?

    You can change the plugin intro text by using the ocdi/plugin_intro_text filter:

    To add some text in a separate «box», you should wrap your text in a div with a class of ‘ocdi__intro-text’, like in the code example above.

    How to disable generation of smaller images (thumbnails) during the content import

    This will greatly improve the time needed to import the content (images), but only the original sized images will be imported. You can disable it with a filter, so just add this code to your theme function.php file:

    How to change the location, title and other parameters of the plugin page?

    As a theme author you do not like the location of the «Import Demo Data» plugin page in Appearance -> Import Demo Data? You can change that with the filter below. Apart from the location, you can also change the title or the page/menu and some other parameters as well.

    How to do something before the content import executes?

    In version 2.0.0 there is a new action hook: ocdi/before_content_import , which will let you hook before the content import starts. An example of the code would look like this:

    How can I enable the `customize_save*` wp action hooks in the customizer import?

    It’s easy, just add this to your theme:

    This will enable the following WP hooks when importing the customizer data: customize_save , customize_save_* , customize_save_after .

    How can I pass Amazon S3 presigned URL’s (temporary links) as external files ?

    If you want to host your import content files on Amazon S3, but you want them to be publicly available, rather through an own API as presigned URL’s (which expires) you can use the filter ocdi/pre_download_import_files in which you can pass your own URL’s, for example:

    I can’t activate the plugin, because of a fatal error, what can I do?

    Update: since version 1.2.0, there is now a admin error notice, stating that the minimal PHP version required for this plugin is 5.3.2.

    You want to activate the plugin, but this error shows up:

    Plugin could not be activated because it triggered a fatal error

    This happens, because your hosting server is using a very old version of PHP. This plugin requires PHP version of at least 5.3.x, but we recommend version 5.6.x or better yet 7.x. Please contact your hosting company and ask them to update the PHP version for your site.

    Issues with the import, that we can’t fix in the plugin

    Please visit this docs page, for more answers to issues with importing data.

    Отзывы

    It works well

    Does it import elementor pages?

    The new update is mind-blowing 🙂

    after updation your plugin is not working.

    Just works

    Crashes site everytime

    Участники и разработчики

    «One Click Demo Import» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

    «One Click Demo Import» переведён на 11 языков. Благодарим переводчиков за их работу.

    Заинтересованы в разработке?

    Журнал изменений

    Release Date — 2 April 2021

    • Fixed missing old default settings page (breaking existing links to the OCDI settings page).
    • Fixed PHP notices in network admin area for WP Multisite.
    • Fixed theme card image style in the sidebar.

    Release Date — 31 March 2021

    • Added more details about recommended plugins.
    • Changed recommended plugins to opt-in.

    Release Date — 31 March 2021

    • IMPORTANT: Support for PHP 5.5 or lower has been discontinued. If you are running one of those versions, you MUST upgrade PHP before installing or upgrading to One Click Demo Import v3.0. Failure to do that will disable One Click Demo Import functionality.
    • IMPORTANT: Support for WordPress core v4.9 or lower has been discontinued. If you are running one of those versions, you MUST upgrade WordPress core before installing or upgrading to One Click Demo Import v3.0. Failure to do that could cause issues with the One Click Demo Import functionality.
    • Added support for recommended theme plugins.
    • Added useful single page demo content imports.
    • Added recommended plugins installer.
    • Updated the UI/UX of the plugin.
    • Fixed PHP8 warning.
    • Fixed deprecated WP function wp_slash_strings_only .

    Release Date — 21 July 2020

    • Fixed Elementor import issues.

    Release Date — 21 July 2020

    • Improved code execution: not loading plugin code on frontend.
    • Fixed incorrect post and post meta import (unicode and other special characters were not escaped properly).
    • Fixed error (500 — internal error) for Widgets import on PHP 7.x.
    • Fixed PHP notices for manual demo import.
    • Fixed PHP warning if set_time_limit function is disabled.
    • Fixed links for switching manual and predefined import modes.

    Release Date — 29 July 2019

    • Improved documentation and code sample
    • Added pt-ocdi/pre_download_import_files filter
    • Added two action hooks to plugin-page.php
    • Bumped Tested up to tag

    Release Date — 25 October 2018

    • Fix missing translation strings

    Release Date — 8 January 2018

    • Add OCDI as a WordPress import tool in Tools -> Import,
    • Add switching to the manual import, if the theme has predefined demo imports,
    • Fix text domain loading

    Release Date — 23 August 2017

    • Add WP-CLI commands for importing with this plugin,
    • Fix conflict with WooCommerce importer

    Release Date — 28 May 2017

    • Add preview button option to the predefined demo import items,
    • Add custom JS event trigger when the import process is completed,
    • Add custom filter for plugin page title,
    • Remove content import as a required import. Now you can make separate imports for customizer, widgets or redux options.
    • Fix custom menu widgets imports, the menus will now be set correctly.

    Release Date — 3 April 2017

    • Fix image importing error for server compressed files,
    • Fix remapping of featured images,
    • Fix custom post type existing posts check (no more multiple imports for custom post types).

    Release Date — 5 February 2017

    • Add ProteusThemes branding notice after successful import,
    • Fix after import error reporting (duplicate errors were shown),
    • Fix some undefined variables in the plugin, causing PHP notices.

    Release Date — 8 January 2017

    • Add grid layout import confirmation popup options filter,
    • Fix term meta data double import,
    • Fix WooCommerce product attributes import.

    Release Date — 13 December 2016

    • Fix issue with customizer options import

    Release Date — 12 December 2016

    • Fix issue with some browsers (Safari and IE) not supporting some FormData methods.

    Release Date — 10 December 2016

    • Add new layout for multiple predefined demo imports (a grid layout instead of the dropdown selector),
    • Add support for Redux framework import,
    • Change the code structure of the plugin (plugin rewrite, namespaces, autoloading),
    • Now the whole import (content, widgets, customizer, redux) goes through even if something goes wrong in the content import (before content import errors blocked further import),
    • Add pt-ocdi/before_content_import action hook, that theme authors can use to hook into before the content import starts,
    • Fix frontend error reporting through multiple AJAX calls,
    • Fix post formats (video/quote/gallery,…) not importing,
    • Fix customizer import does not save some options (because of the missing WP actions — these can be enabled via a filter, more in the FAQ section).

    Release Date — 29 October 2016

    • Add support for WP term meta data in content importer,
    • Fix the issue of having both plugins (OCDI and the new WP importer v2) activated at the same time.

    Release Date — 1 October 2016

    • Import/plugin page re-design. Updated the plugin page styles to match WordPress (thanks to Oliver Juhas).

    Release Date — 9 July 2016

    • Now also accepts predefined local import files (from theme folder),
    • Fixes PHP fatal error on plugin activation, for sites using PHP versions older then 5.3.2 (added admin error notice),
    • Register log file in wp-admin -> Media, so that it’s easier to access,
    • No more «[WARNING] Could not find the author for …» messages in the log file.

    Release Date — 17 June 2016

    • Updated plugin design,
    • Changed the plugin page setup filter name from pt-ocdi/plugin-page-setup to pt-ocdi/plugin_page_setup (mind the underscore characters instead of dashes).

    Release Date — 12 June 2016

    • An ‘import notice’ field has been added to the predefined demo import settings. This notice is displayed above the import button (it also accepts HTML),
    • Now displays proper error message, if the file-system method is not set to «direct»,
    • This plugin is now compatible with the new Humanmade content importer plugin,
    • Added a filter to the plugin page creation, so that theme authors can now change the location of the plugin page (Demo data import) and some other parameters as well.

    Release Date — 22 May 2016

    • Preview import images can now be defined for multiple predefined import files (check FAQ «How to predefine demo imports?» for more info),
    • You can now also import customizer settings.

    Release Date — 14 May 2016

    • Content import now imports in multiple AJAX calls, so there should be no more server timeout errors,
    • The setting for generation of multiple image sizes in the content import is again enabled by default,
    • Plugin textdomain was loaded, so that translations can be made.

    Release Date — 27 April 2016

    • Added filter to enable image regeneration,
    • Added filter to change the plugin intro text,
    • Added action to execute custom code before widget import,
    • Disabled author imports.

    Release Date — 15 April 2016

    • Monkey fix for WP version 4.5. — disabled generation of multiple image sizes in the content import.

    Release Date — 2 April 2016

    Small code fixes:

    • Fixed undefined variable bug,
    • Fixed naming of downloaded files and their filters.

    Источник

    Оцените статью