focusphoto

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: Error on "Add Event" Page (community events) #1607215
    focusphoto
    Participant

    Thanks Victor,

    Just installed it and the code is fine now!

    We actually had patched this locally anyway while waiting for your fix, but at least now the fix is in your official code so your other users can benefit too. 🙂

    Regards
    Arun

    in reply to: Error on "Add Event" Page (community events) #1596027
    focusphoto
    Participant

    Hi Victor,

    No problems at all. I think you may have missed it but I had another reply above with the solution and the patch I applied locally to have it working.

    If you shared that with your developers it might assist them with a quicker fix 🙂

    Here is the link to the exact code causing the problem (at least for our install):
    https://theeventscalendar.com/support/forums/topic/error-on-add-event-page-community-events/#post-1594741

    Regards
    Arun

    in reply to: Error on "Add Event" Page (community events) #1594741
    focusphoto
    Participant

    Hi Victor,

    Ok I have also found the offending code in your codebase that is actually causing this problem.

    In addition to the Asset loading change above, in the new version of Community Events, the JS scripts are unloaded in your code as below.

    On Line 476 of the-events-calendar-community-events/src/Tribe/Main.php :

    tribe( 'assets' )->remove( 'tribe-events-calendar-script' );

    This line is removing the JS file needed, for the Add Event page to correctly show the dropdowns / Date Pickers etc. It then is not getting loaded correctly after that.

    As an example, I have commented out the line, and it is loading perfectly after that. See attached screenshots.

    Obviously this is NOT a conflict with any other extension, but a clear bug in your code. Please can you get your developers to push out a fix when possible.

    in reply to: Error on "Add Event" Page (community events) #1594719
    focusphoto
    Participant

    Hi Victor,

    I’ve definitely found what changed in your code between the versions. As I mentioned above, the errors are due to JS array called tribe_js_config not being loaded.

    This bug started happening after your base Events Calendar changed the way these JS files was loaded.

    It used to be loaded via a file: the-events-calendar/src/Tribe/Asset/Calendar_Script.php :
    class Tribe__Events__Asset__Calendar_Script extends Tribe__Events__Asset__Abstract_Asset {

    	public function handle() {
    ..............
    
    		wp_localize_script( $handle, 'tribe_js_config', $js_config_array );
    	}
    }

    This has been replaced in a recent update to be loaded via the-events-calendar/src/Tribe/Assets.php :

    		tribe_asset(
    			$plugin,
    			'tribe-events-calendar-script',
    			'tribe-events.js',
    			array( 'jquery', 'tribe-events-bootstrap-datepicker', 'tribe-events-jquery-resize', 'jquery-placeholder' ),
    			'wp_enqueue_scripts',
    			array(
    				'conditionals' => array( $this, 'should_enqueue_frontend' ),
    				'in_footer'    => false,
    				'localize'     => array(
    					'name' => 'tribe_js_config',
    					'data' => array( $this, 'get_js_calendar_script_data' ),
    				),
    			)
    		);

    For whatever reason, this change is causing the array not to get loaded anymore.

    Could this be trying to load the files in a way that is incompatible with us using Cloudflare, perhaps?

    Is this something you could please escalate and check with your developers.

    in reply to: Error on "Add Event" Page (community events) #1594668
    focusphoto
    Participant

    By the way, I do see this user reporting the identical issue:
    https://theeventscalendar.com/support/forums/topic/community-events-date-time-venue-organizer/

    Not sure if their one is the conflict with the plugin you mentioned or not, but it looks like the same issue we have.

    Right down to the exact same Javascript errors (word for word identical error) 🙂

    in reply to: Error on "Add Event" Page (community events) #1594665
    focusphoto
    Participant

    Hi Victor,

    Thanks for getting back to me. Yes we dont use the Google Maps / Multiple Events plugin.

    I have installed the updated version for the Relabeller but that doesnt fix the issue. Not surprising since I had disabled that plugin before and had not seen it working ( so it wasnt the cause).

    Yes a staging server would be nearly impossible for me to set up. This is essentially a client’s site with very limited resources.

    I am going through your Community events code now, and comparing it to previous versions from our backups – when this bug was not there.

    If you are able to share a demo site where I can see this latest version of your community event “add event” page working properly, it will help me debug much easier.

    Regards
    Arun

    in reply to: Error on "Add Event" Page (community events) #1594432
    focusphoto
    Participant

    Hi Victor,

    I am happy to try and debug the code on our end. I suspect there is another javascript file that is meant to be loaded before the tribe-events.js which sets tribe_js_config which is not getting loaded in your latest updates, for some reason.

    Could you please share a demo site URL where the Add Event page is accessible publicly (or share a login please) so I can compare the JS that is meant to get loaded?

    Thanks
    Arun

    in reply to: Error on "Add Event" Page (community events) #1594431
    focusphoto
    Participant

    FYI root cause of this issue appears to be with the tribe_js_config variable in the JS files being loaded by events calendar.

    Uncaught ReferenceError: tribe_js_config is not defined
        at tribe-events.min.js?ver=4.6.21:formatted:573

    I notice another user reported this specific variable too, but I can’t see the resolution since the thread is private:
    https://theeventscalendar.com/support/forums/topic/browser-errors-tribe_js_config/

    in reply to: Error on "Add Event" Page (community events) #1594428
    focusphoto
    Participant

    Hi Victor,

    Thanks for getting back. I have now opted in to the sharing of system info. Let me know if you are able to debug this further.

    Yes we tried disabling plugins earlier (as I mentioned above) it did not help at all. Unfortunately we can’t keep it running in that state so had to restore our usual setup back.

    Please note this was working perfectly until your plugin got the most recent update. As you can see multiple users are reporting the same bugs within the same timeframe!

    Regards
    Arun

    in reply to: Error on "Add Event" Page (community events) #1593745
    focusphoto
    Participant
    in reply to: Error on "Add Event" Page (community events) #1593741
    focusphoto
    Participant

    Looks like the JS errors we are seeing are the same sort of errors this user reported in another thread in the last few days too:
    https://theeventscalendar.com/support/forums/topic/bug-the-events-calendar-pro-extension/

    It appears your latest updates have introduced this bug.

    Can a moderator / admin please escalate this to the development team and get back to us?

    in reply to: Error on "Add Event" Page (community events) #1592753
    focusphoto
    Participant

    Just thought I would add this here – I think it’s related to the problems above.

    I’ve noticed the following JS / Jquery errors are showing up in the web console for this page (see attached).

    in reply to: Sort order issue with Community Event RSS #1590146
    focusphoto
    Participant

    Just wanted to report back that I added this bit of extra code to force the descending order sort.

    This – along with your code above for using published date, has fixed the behaviour.

    // Change sort order of RSS to Desc -> i.e. NEW posts at TOP.
    function alter_wp_sort_desc( $request )
    {
        $dummy_query = new WP_Query();
        $dummy_query->parse_query($request);
    
        if($dummy_query->is_feed())
            $request['order'] = 'DESC';
    
        return $request;
    }
    add_filter('request', 'alter_wp_sort_desc');
    in reply to: Sort order issue with Community Event RSS #1590121
    focusphoto
    Participant

    Actually I have found this help document which has the code snipped for ordering Events by Publication Date:
    https://theeventscalendar.com/knowledgebase/customize-rss-feed/

    add_action( 'pre_get_posts', 'custom_teardown_tribe_order_filter', 60 );
     
    function custom_teardown_tribe_order_filter() {
     if ( is_feed() ) remove_filter( 'posts_orderby', array( 'Tribe__Events__Query', 'posts_orderby' ), 10, 2 );
    }

    However it is not working correctly. Still shows events added later to the bottom of the feed. 🙁

    focusphoto
    Participant

    Hi there,

    Okay I got it working, I had to add in some additional lines into the function. This seems to make it work:

    update_post_meta( $event_id, '_EventShowMapLink', 'false' );
    update_post_meta( $event_id, '_EventShowMap', 'false' );

    Thanks for sorting this out for us!

    Regards
    Arun

Viewing 15 posts - 1 through 15 (of 16 total)