Public Ticket #2552787
Adding New Layer Slider


  • Paul Daly started the conversation


    When adding a new layer slider my site has generated the following error and no new layer gets created:

    WordPress database error Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `bZKYKLmZlayerslider` (`group_id`, `author`, `name`, `slug`, `data`, `date_c`, `date_m`, `flag_popup`) VALUES (NULL, 1, 'Home', '', '{"properties":{"createdWith":"6.11.2","sliderVersion":"6.11.2","title":"Home","new":true},"layers":[[]]}', 1601281995, 1601281995, 0) made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, ls_add_new_slider, LS_Sliders::add

    It also generates massive errors when trying to import sliders (the images import into the library).

    I have the following plugins - Autoptimize, WP Super Cache - I have cleared the cache before and after trying to create layerslider.

    Hopefully you can help

  • Paul Daly replied

    Hi Again,

    Ok I resolved this issue by deleting the entry in the database that had a 0 for the ID.  The 0 for the ID was created by trying to import a template from the store and it generated an error.  But it would appear it writes an entry to the database and imports required images.

    It's not a timeout issue as my TIMEOUT is set to no limit. Maybe it's a MEMORY_LIMIT currently set at 256M.

    Other setting are:

    Server SettingsPHP Version:7.4.10PHP Time Limit:No limitPHP Memory Limit:256MPHP Post Max Size:500MPHP Max Upload Size:500MSuhosin:Not foundPHP ZipArchive Extension:EnabledPHP DOMDocument Extension:EnabledPHP Multibyte String Extension:EnabledPHP Multibyte Regex Functions:EnabledWP Remote functions:OK

  •  116
    Kristof replied

    Hello Paul,

    Thank you for getting in touch with us!
    Could you please send me a screenshot about your LayerSlider WP -> Options -> System Status tab?
    I would like to check it. Thank you, in advance.

    Best Regards,
    Kristof Molnar | Kreatura Support Team

  • Paul Daly replied

    Please see screenshot.

  • Paul Daly replied

    Try again with correct screenshot.

    Attached files:  Screenshot 2020-09-28 at 10.18.44.png

  •  116
    Kristof replied

    Hello Paul,

    Thank you. 
    As I see it is correct. Could you please enable the wp debug mode and check the PHP error logs when you try to import a slider from the template store?
    Please check it and send the error messages to see what cause this problem.

    Issues could be related to other plugins/themes and their settings. We often ask our customers to temporarily disable other plugins and switch to one of the default WP themes. This way we can quickly eliminate external and 3rd party factors. If it solves the problem, you can find which item caused the trouble by re-enabling them one-by-one and watching when the issue comes back.

    Best Regards,
    Kristof Molnar | Kreatura Support Team

  •   Paul Daly replied privately
  • Paul Daly replied


    I have sorted this problem out so I can hopefully help anyone else that has this issue.

    Problem: SERVER ERROR

    I have a theme (Enfold) with the LayerSlider WP bundled in.  This is the reason I decided to buy the full plugin version.

    With the Enfold theme still active, I installed the new plugin and activated it using the activation code.  I then had a browse at the templates and chose one to import into my site.  This is when it threw a system error and asked me to check the System Status (which I did).  I couldn't see anything obvious that was wrong.  

    But when I checked the php error log generated by the https://en-gb.wordpress.org/plugins/error-log-monitor/ plugin (awesome plugin btw).  It told me the plugin was trying to insert multiple items with a 0 (zero) ID preventing the plugin from completing the import.


    If you already have slides created then don't worry, you can use the built in Exporter to export all of your slides and download them locally.*  

    1. Go to the System Status in the LayerSlider WP Options menu item.  

    2. Click on "Erase All Plugin Data" and confirm.  This will erase the plugin, plugin tables and images imported by the layer slider.

    3. Re-Upload and install the plugin, activate it (and activate using your key) and import your previously exported slides (works like a charm as I did it)

    And that's it....You're good to go.

    *Do a site and database backup before doing any of the above (backside covered).

    Attached files:  Screenshot 2020-09-29 at 10.45.32.png

  •  116
    Kristof replied

    Hello Paul,

    Thank you for your feedback!
    I'm glad that you have managed to solve this issue.

    Best Regards,
    Kristof Molnar | Kreatura Support Team