Home › Forums › Calendar Products › Events Calendar PRO › Uncaught TypeError: $(…).bumpdown is not a function
- This topic has 25 replies, 3 voices, and was last updated 8 years, 7 months ago by
Carsten.
-
AuthorPosts
-
July 6, 2017 at 2:27 am #1316725
Carsten
ParticipantHi,
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!
CarstenJuly 6, 2017 at 2:29 am #1316727Carsten
ParticipantThis reply is private.
July 6, 2017 at 2:50 am #1316732Carsten
ParticipantThis reply is private.
July 7, 2017 at 4:07 am #1317308Carsten
ParticipantHi,
is there anything i can do to assist you with the problem?
Thanks.
CarstenJuly 7, 2017 at 11:00 am #1317535Andras
KeymasterHallo 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,
AndrasJuly 7, 2017 at 11:35 am #1317570Carsten
ParticipantAh 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!
CarstenJuly 10, 2017 at 3:19 am #1318290Carsten
ParticipantHi 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.
CarstenJuly 10, 2017 at 7:41 am #1318387Andras
KeymasterHi 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,
AndrasJuly 10, 2017 at 8:23 am #1318419Carsten
ParticipantHi András,
all three Countrys are whitelisted now. You should be able to login now.
Thanks for your support!
CarstenJuly 11, 2017 at 6:42 am #1319464Carsten
ParticipantHi 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.
CarstenJuly 11, 2017 at 7:40 am #1319497Carsten
ParticipantHi 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,
July 11, 2017 at 9:47 am #1319641Andras
KeymasterCarsten, 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,
AndrasJuly 11, 2017 at 10:53 am #1319686Carsten
ParticipantHi 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_folderBest Regards,
CarstenJuly 11, 2017 at 11:52 am #1319712Carsten
ParticipantHi,
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; }July 12, 2017 at 6:35 am #1319980Andras
KeymasterHey 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 -
AuthorPosts
- The topic ‘Uncaught TypeError: $(…).bumpdown is not a function’ is closed to new replies.
