Support » Plugin: SVG Support » Elementor 500 error when viewing media library

  • Resolved nem2k


    I have a site with svg support and elementor installed and I tried to use duplicator to create a backup, and then restore it to a local wordpress install with an internal ip

    Most things seem to work smoothly. However, when I go into elementor and try to insert an SVG file using its media library I see a spinning icon and no images load.

    chrome devtools shows the following error:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error) /wp-admin/admin-ajax.php

    looking at my apache log I see the file and function thats causing the issue:

    [Mon Feb 19 19:01:25.656297 2018] [php7:error] [pid 1521] [client] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_file() in /var/www/html/wp-content/plugins/svg-support/functions/attachment-modal.php:40\nStack trace:\n#0 /var/www/html/wp-content/plugins/svg-support/functions/attachment-modal.php(20): bodhi_svgs_get_dimensions('/var/www/html/w...')\n#1 /var/www/html/wp-includes/class-wp-hook.php(286): bodhi_svgs_response_for_svg(Array, Object(WP_Post), '')\n#2 /var/www/html/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array)\n#3 /var/www/html/wp-includes/media.php(3290): apply_filters('wp_prepare_atta...', Array, Object(WP_Post), '')\n#4 [internal function]: wp_prepare_attachment_for_js(Object(WP_Post))\n#5 /var/www/html/wp-admin/includes/ajax-actions.php(2484): array_map('wp_prepare_atta...', Array)\n#6 /var/www/html/wp-includes/class-wp-hook.php(286): wp_ajax_query_attachments('')\n#7 /var/www/html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)\n#8 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#9 /var/www/html/wp- in /var/www/html/wp-content/plugins/svg-support/functions/attachment-modal.php on line 40, referer:

    SVGs seem to work ok I use another svg plugin, but svg-support seems to have a weird interaction with elementors media library after a duplicator restore

    Thoughts on how to fix this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Benbodhi


    Hi @nem2k,

    Sorry for the ridiculous delay in getting back to you. It seems there was a few posts that did not send em a notification email unfortunately.

    I personally don’t use duplicator… but it’s a popular plugin and they should play nice together. I’ll try to make time to test this as soon as possible.

    Please do let me know if you found a solution.

    I havent had time to test it any more since the original post, but from what I can remember it might be specific to restoring to either a local ip (VM), or to a different domain.

    Plugin Author Benbodhi


    I had a feeling it might have been something like that. I’ve taken note of this issue and to test with a duplicator restore to local.

    I’ll mark this as resolved for now because I’m not sure I will be able to do anything in my plugin. But I will look in to it.

    Just in case someone ends up here when searching for 500 errors with Elementor:

    Your server (or in my case, my local VM Vagrant/Scotchbox) may not have SimpleXML php module installed.

    Installing it for php7 on Ubuntu:

    sudo apt-get update
    sudo apt-get install php7.0-xml
    sudo service apache2 restart

    enkia, thank you, this was also the case for me. Only difference is:
    sudo service php7.0-fpm restart

    if you are using Nginx + php7.0-fpm.

    Plugin Author Benbodhi


    Thank you for adding more helpful info for future users 😀

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Elementor 500 error when viewing media library’ is closed to new replies.