• Resolved pccweb

    (@pccweb)


    Running MetaSlider free on WP multisite.

    Since update to version 3.14.0 the following happens:

    – On entering MetaSlider admin, returns “There was an error with your request. Reload the page and try again.”
    – Updates return “Error.” and no changes are saved.
    – Cannot reorder slides.
    – Links on slides only works on first few slides.
    – Captions will not save and only appear on first few slides.
    – ULTIMATELY saving does not happen.

    Downgrading to version 3.13.1 fixes everything. I’m wondering if it has something to do with the changelog item “REFACTOR: Refactors the way slides and the slideshow saving works”?

    Web inspector returns the following errors:
    MetaSlider: – “There was an error with your request. Reload the page and try again.”
    notifyError – app-3-14-0.js:13900
    throwError – app-3-14-0.js:141089:181
    (anonymous function) – app-3-14-0.js:14046

    No conflicts with theme or other plugins.

    I hope the above helps to resolve this issue for the next update.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi @pccweb

    You mention “No conflicts with theme or other plugins.”. Have you disabled other plugins to be sure? The symptom implies that the server is erroring out during a request to the server, or another plugin is interfering with the request. It could also be that the REST API in WordPress is disabled as well.

    Can you open the dev tools then reload the page? On the network tab click the request that shows in red to maybe get a better error message.

    Thread Starter pccweb

    (@pccweb)

    All plugins were disabled and this did not resolve issue.

    In one of the sites within the multisite (not the main site) under Tools/Site Health, the REST API call gave the following unexpected result: (404) {“description”:””,”hierarchical”:false,”name”:”Posts”,”slug”:”post”,”taxonomies”:[“category”,”post_tag”],”rest_base”:”posts”,”_links”:{“collection”:[{“href”:”http:\/\/pccweb.ca\/wp-json\/wp\/v2\/types”}],”wp:items”:[{“href”:”http:\/\/pccweb.ca\/wp-json\/wp\/v2\/posts”}],”curies”:[{“name”:”wp”,”href”:”https:\/\/api.w.org\/{rel}”,”templated”:true}]}}.

    In dev tools/Network there are no requests showing red, but the Console has the following errors similar to what I provided before:

    Failed to load resource: the server responded with a status of 404 (Not Found) https://nassagaweya.com/wp-json/metaslider/v1/themes/all?action=ms_get_all_free_themes
    MetaSlider: – “There was an error with your request. Reload the page and try again.”
    notifyError – app-3-14-0.js:1:399973
    throwError – app-3-14-0.js:1:404988
    (anonymous function) – app-3-14-0.js:1:403164
    promiseReationJob

    Hi @pccweb

    Do you have REST disabled?

    I have a fix for this coming in the next version but for now you will have to manually change a line in the code. In ml-silder/admin/Pages.php find the line that says:

    $can_use_rest = class_exists('WP_REST_Controller');

    and update it to:

    $can_use_rest = false;

    Let me know if that works.

    Thread Starter pccweb

    (@pccweb)

    That value change seems to have fixed the errors.

    I don’t recall disabling REST. I dug through all the settings within the Multisite I could think of to find a reference to REST for disabling/enabling, but couldn’t find anything. I usually don’t do any custom coding aside from in wp-config and .htaccess so as to avoid having to deal with updating code every time there is an update to WP core, themes or plugins. Makes life easier.

    Hi @pccweb

    We should have a release next week with a fix for this. I’m not sure why but a few people have experienced the same issue. If after the next release you are having issues, I will include a dafe way to force non-REST routes with MetaSlider, using the following:

    define('METASLIDER_FORCE_ADMIN_AJAX', true);

    I’ll mark this as resolved but feel free to reply further as needed.

    Thread Starter pccweb

    (@pccweb)

    Just updated from 3.14.0 (where I had tweaked the pages.php file as advised above—which fixed that issue) to 3.15.1, but now the Metaslider settings page doesn’t load the existing sliders. See screen capture https://snipboard.io/eCJkdb.jpg

    Hi @pccweb

    Did you add the constant I recommended?

    define('METASLIDER_FORCE_ADMIN_AJAX', true);

    Thread Starter pccweb

    (@pccweb)

    No, I hadn’t. I though you were adding something to the code. I must have misunderstood. Where should your recommended constant go? I tried adding it to the pages.php [didn’t work], I tried adding it to wp-config.php [ didn’t work] I also attempted changing the boolean from false to true on line 222 of pages.php [also didn’t work]. Please advise where the constant should be placed if other than where I attempted placement.

    Kind regards

    Hi,

    There wasn’t a fix added as it’s something specific to your server/setup that is causing issues. I added a manual way to disable our REST implementation by adding define('METASLIDER_FORCE_ADMIN_AJAX', true); to wp-config.php.

    If it’s still not working, then it might indicate a larger issue. Do you see a new error message in the browser console?

    Do you have access to PHP log files? Anything there?

    Thread Starter pccweb

    (@pccweb)

    The recent update 3.15.2 with the addition of adding define('METASLIDER_FORCE_ADMIN_AJAX', true); to wp-config.php did the trick.

    Thanks!

    Hi @pccweb

    FYI. I added that constant as a convenience, as it’s a workaround for those who have REST misconfigured on their servers (or some other failure). You might have issues with Gutenberg and other plugins in the future. i.e. this is a “band-aid”.

    But glad to hear it’s working!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Slider not saving, returns error’ is closed to new replies.