Home › Forums › Calendar Products › Community Events › Error on "Add Event" Page (community events)
- This topic has 18 replies, 2 voices, and was last updated 5 years, 8 months ago by focusphoto.
-
AuthorPosts
-
August 8, 2018 at 3:19 am #1592730focusphotoParticipant
Hi there,
We have started seeing a bug (3 issues) on the Add Event page for community events.
This only started showing up recently, I believe since we updated to the latest plugin update in the last few days.
- Event Date field is not showing calendar picker anymore
- Event Location / Venue selection is showing as blank – dropdown not showing
- Event Organizer selection is showing as blank – dropdown not showing
Note we have customized our display to call these “Shoots” rather than events, but even without the renaming, the same problems are occurring.
Screenshot attached.
Regards
ArunAugust 8, 2018 at 4:13 am #1592753focusphotoParticipantJust 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).
August 9, 2018 at 6:10 am #1593741focusphotoParticipantLooks 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?
August 9, 2018 at 6:18 am #1593745focusphotoParticipantAnd yet another user with the same bug:
https://theeventscalendar.com/support/forums/topic/community-events-date-time-venue-organizer/August 9, 2018 at 5:14 pm #1594352VictorKeymasterHi Arun,
Thanks for taking the time to report this issue and for sending over the information you’ve found so far.
I made a few tests on my end but I’m not able to reproduce this, so let me help you with the troubleshooting so we can hopefully find the source of the problem.
First, could you please share with us your system information by following this guide > https://theeventscalendar.com/knowledgebase/sharing-sys-info/ ? We’ll see if there is anything strange that would indicate an error from there.
Also, did you happen to notice a difference when deactivating all other plugins or switching to a default WordPress theme, like Twenty Seventeen? What happens if you try deactivating all plugins and switching to the Twenty Seventeen theme together? Do you notice a difference then?
If you see no difference in those conditions, then we’ll need to do some deeper troubleshooting
Thanks,
VictorAugust 9, 2018 at 7:57 pm #1594428focusphotoParticipantHi 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
ArunAugust 9, 2018 at 8:39 pm #1594431focusphotoParticipantFYI 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/August 9, 2018 at 8:57 pm #1594432focusphotoParticipantHi 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
ArunAugust 10, 2018 at 6:43 am #1594641VictorKeymasterHi Arun,
Thanks for following up with this.
The related threads you mention seem to be a conflict with one of our extensions > https://theeventscalendar.com/extensions/google-maps-multiple-events-same-venue/ which I don’t see you are using since you don’t have it installed.
However, I do see you have our The Events Calendar Extension: Relabeler version 1.0.0. You are using the previous versions of it, so could you please try downloading and installing the latest version from https://theeventscalendar.com/extensions/change-labels-events-venues-organizers/ and see if any change?
Unfortunately, I’m not able to reproduce the error replicating your site’s setting in my local installation.
Unfortunately we can’t keep it running in that state so had to restore our usual setup back.
I definitely understand this. We always suggest to setup a dev/staging site so you can test things out and make all plugins, theme and WordPress core updates without disrupting the live site. Is this something you can setup and share a link with us, in a private reply if you’d like?
If that’s not possible, I may be able to setup a sandbox site for you to check it out. I’ll reach out to the team about it.
Thanks,
VictorAugust 10, 2018 at 6:56 am #1594665focusphotoParticipantHi 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
ArunAugust 10, 2018 at 7:08 am #1594668focusphotoParticipantBy 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) 🙂
August 10, 2018 at 8:12 am #1594719focusphotoParticipantHi 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.
August 10, 2018 at 8:26 am #1594741focusphotoParticipantHi 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.
August 13, 2018 at 6:33 am #1596025VictorKeymasterHi Arun,
Thanks so much for investigating this on your end and keeping us posted about it 🙂
It definitely seems related to the assets change we made in our latest release of our plugins.
I have created a bug report so our developers can investigate this further and hopefully find a fix for it. I have also link the other threads to the report and flagged this to the team so we can be aware of it.
I will set this thread’s status to “Pending Fix” and link it to the report. This way, we will notify you once a fix is released.
In the meantime, the only workaround I’ve found is to downgrade to a previous version of The Events Calendar and Community Events. As a reference, we have a guide on how you can downgrade a plugin to a previous version > https://theeventscalendar.com/knowledgebase/downgrading-plugin-past-version/
We apologize for the inconvenience and we appreciate your patience while we work on this.
Best,
VictorAugust 13, 2018 at 6:42 am #1596027focusphotoParticipantHi 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-1594741Regards
Arun -
AuthorPosts
- The topic ‘Error on "Add Event" Page (community events)’ is closed to new replies.