RevSlider Saving Custom JS causes Ajax-Error

Hello to the forum. Found similar problems but no solutions yet:

After entering the code form this thread http://www.themepunch.com.cach3.com/index.html@p=9998 and trying to save it I’m getting a ‘ajax error’ in rev slider,
a POST /wp-admin/admin-ajax.php 403 with the initiator load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,moxiejs,plupload&ver=4.9.8:4.
Leaving out line 7 (and 8) from the script doesnt throw any errors.
This is a fresh wp-install, the only plugins installed are cornerstone and revolution slider. On the server are running many sites without any problem. Help would be appreciated!

Hey Hei,

Thanks for writing in. Regretfully, I could not provide an answer based on the short information provided or we don’t have verification that you’ve followed the steps completely. Please follow our How to Get Support guide at https://theme.co/apex/forum/t/how-to-get-support/288. That is so you’ll know how to get support from us efficiently.

With that said, please give us details and screenshots showing what you have done so we could verify that you’ve followed the steps in ThemePunch’s guide.

For now, please contact your host to increase your allocated memory or do it yourself by adding this code in your wp-config.php

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks.

Thanks for the quick reply. You dont have a verification that I followed the forum guidelines or the short information? Not sure if I understand what you mean, which one is it ?
I’ve posted the the whole problem in all it’s details. What I’ve done is exactly described in the posted link. The error response I’ve described as detailed as possible as well. No plugins, no special slider in concern. The memory-limits dont solve the error. Worked around the error by calling the script globally if it helps:

     function initPauseOnHover(){
        if(typeof revapi1 === 'undefined') {
            setTimeout(initRevListeners, 700);
        }
        else {
            revapi1.on('mouseenter mouseleave', function(event) {
                var action = event.type === 'mouseenter' ? 'pause' : 'resume';
                jQuery('.tp-caption').each(function(){
                    var anime = jQuery(this).data('timeline');
                    if(anime) anime[action]();
                });
            });
        }
    }

    jQuery(initPauseOnHover());

Sorry for the confusion. I was not sure where you’ve added the code based on your statement “After entering the code form this thread” so I wanted to confirm or verify if your setup is correct by showing details of your actual setup.

I realized that it could be quite numerous so would you mind giving us WordPress Admin credentials in a Secure Note instead?

Increasing memory sometimes solves admin-ajax issues. Would you mind replacing the code I suggested with this:

ini_set('memory_limit', '256M');
ini_set('upload_max_filesize', '128M');
ini_set('post_max_size', '128M');
ini_set('file_uploads', 'On');
ini_set('max_execution_time', '3000');

Thanks.

1 Like

No problem, this solved the issue it seems. Thanks a lot!

On behalf of my colleague, you’re welcome. Cheers! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.