Uncaught TypeError: $(…).bumpdown is not a function

Home Forums Calendar Products Events Calendar PRO Uncaught TypeError: $(…).bumpdown is not a function

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #1316725
    Carsten
    Participant

    Hi,

    one of the last Event-Calendar-Updates resulted in errors in the event-admin-pages on our Multisite-Network. Because of this error our customers aren’t able to add new Organiziers or Locations.

    It works on a fresh WordPress-Install, but it seems to break when moving the standard-wp-plugin-folder to another location.

    We have created a subsite on our network for your support, i will post the credentials in a private message hereafter.

    Do you have an idea what the problem could be?

    Thanks!
    Carsten

    #1316727
    Carsten
    Participant

    This reply is private.

    #1316732
    Carsten
    Participant

    This reply is private.

    #1317308
    Carsten
    Participant

    Hi,

    is there anything i can do to assist you with the problem?

    Thanks.
    Carsten

    #1317535
    Andras
    Keymaster

    Hallo Carsten, grüss dich

    Thanks for reaching out and welcome to the forums!

    I’m sorry about this issue, I’d be happy to take a look at it.

    Although we usually don’t log in to customers’ sites, in this case however it might provide some clues and make the resolution much faster.

    I tried to log in to the provided test site, but the firewall blocked and logged me with the incident ID “#000000”.

    I could share with you my IP but likely it is going to change the next time I log in. Is there any way you can enable logging in?

    Thanks and cheers,
    Andras

    #1317570
    Carsten
    Participant

    Ah sorry! Our WAF blocks access to the /wp-admin/ from outside central europe. All our customers come from Germany.

    Where do you log in from? I can put any Country on the whitelist in a minute.

    Thanks for your help!
    Carsten

    #1318290
    Carsten
    Participant

    Hi András,

    can you tell me the country you log in from?

    More and more Customers get aware of the problem and it would be really good to know if you can support us with a fix for this problem!

    Thanks.
    Carsten

    #1318387
    Andras
    Keymaster

    Hi Carsten,

    In the coming couple weeks I’m in Slovakia and Hungary, afterwards I’m in Switzerland. If you can whitelist those that would be great.

    Cheers,
    Andras

    #1318419
    Carsten
    Participant

    Hi András,

    all three Countrys are whitelisted now. You should be able to login now.

    Thanks for your support!
    Carsten

    #1319464
    Carsten
    Participant

    Hi András,

    today i had a deeper look into your code and i think i found the problem.

    The function maybe_get_min_file (common/src/Tribe/Assets.php) seems to rely on the Plugin residing in the WP_CONTENT_DIR. But this is not mandatory. You can move the plugins-Folder to any place you would like in a wordpress-Install (like we did).

    Here is the Documentation about moving the plugin-folder: https://codex.wordpress.org/Editing_wp-config.php#Moving_plugin_folder

    Here you see, that the plugin-Folder does not have to be in the WP_CONTENT_DIR!

    In my case the $file in the function is not converted to a path, the following file_exists fails und the maybe_get_min_file returns a false, which results in the javascript not loaded.

    Did you get what the problem is? Is there anything we can do to assist you any further?

    This is a pretty big issue at the moment and it would be great to fix this as soon as possible!

    Thanks.
    Carsten

    #1319497
    Carsten
    Participant

    Hi András,

    we changed the last return false to a return $url, what fixes the problem on our multisite network for the moment.

    It would be great if you would fix the problem with your next update, so we dont have to edit the Assets.php everytime an update is published…

    I saw now possibility to fix the problem without changing your Plugin-Code.

    So now you aren’t able to see the problem on the site we have provided, but it still exists on a unchanged Plugin and is documented above.

    Best Regards,

    #1319641
    Andras
    Keymaster

    Carsten, thanks for looking into this so deeply!

    Meanwhile I also had a conversation with one of the developers and told me that if the content folder was moved / renamed “as it should be”, then the plugins should work.

    Nonetheless there might be the issue, which you pointed out up there. I will have some further discussions on this and will get back to you as soon as I have something. I ask for a bit of patience.

    Cheers,
    Andras

    #1319686
    Carsten
    Participant

    Hi András,

    Meanwhile I also had a conversation with one of the developers and told me that if the content folder was moved / renamed “as it should be”, then the plugins should work.

    No. We didn’t move the wp-content-folder, but the Plugins-Folder! Thats possible too, have a look:
    https://codex.wordpress.org/Editing_wp-config.php#Moving_plugin_folder

    Best Regards,
    Carsten

    #1319712
    Carsten
    Participant

    Hi,

    i changed the maybe_get_min_file-function from relying on the wp-content-folder to using the actual location of the event-calendar-plugin. Pretty simple. Free feel to use it!

    /**
    	 * Returns the path to a minified version of a js or css file, if it exists.
    	 * If the file does not exist, returns false.
    	 *
    	 * @since 4.3
    	 *
    	 * @param string $url   The path or URL to the un-minified file.
    	 *
    	 * @return string|false The path/url to minified version or false, if file not found.
    	 */
    	public static function maybe_get_min_file( $url ) {
    		$urls = array();
    		// If need add the Min Files
    		if ( ! defined( 'SCRIPT_DEBUG' ) || SCRIPT_DEBUG === false ) {
    			if ( substr( $url, - 3, 3 ) === '.js' ) {
    				$urls[] = substr_replace( $url, '.min', - 3, 0 );
    			}
    
    			if ( substr( $url, - 4, 4 ) === '.css' ) {
    				$urls[] = substr_replace( $url, '.min', - 4, 0 );
    			}
    		}
    
    		// Add the actual url after having the Min file added
    		$urls[] = $url;
    
    		// Check for all Urls added to the array
    		foreach ( $urls as $key => $url ) {
    			//set path to file for Windows
    			$file = $url;
    			
    			//Set variable for plugins normalized directory
    			$normalized_plugin_dir = wp_normalize_path( dirname(TRIBE_EVENTS_FILE) ) . '/';
    			$plugin_url = plugin_dir_url( TRIBE_EVENTS_FILE );
    			
    			//Detect if $url is actually a file path
    			if ( false !== strpos( $url, $normalized_plugin_dir ) ) {
    				// Turn file Path to URL in Windows
    				$url = str_replace( $normalized_plugin_dir, $plugin_url, $url );
    			} else {
    				// Turn URL into file Path
    				$file = str_replace( $plugin_url, $normalized_plugin_dir, $url );
    			}
    			//if file exists return url
    			if ( file_exists( $file ) ) {
    				return $url;
    			}
    		}
    
    		// If we don't have any real file return false
    		return false;
    	}
    #1319980
    Andras
    Keymaster

    Hey Carsten,

    Yes, sorry, my bad. I meant the plugins folder.

    Thanks for sharing your solution. We’ll give it a check and if it needs be we’ll implement it or something similar.

    Cheers,
    Andras

Viewing 15 posts - 1 through 15 (of 25 total)
  • The topic ‘Uncaught TypeError: $(…).bumpdown is not a function’ is closed to new replies.