Home › Forums › Calendar Products › Events Calendar PRO › Previous and Next buttons (suddenly) not navigating from initial page in List
- This topic has 15 replies, 3 voices, and was last updated 10 years, 3 months ago by
Support Droid.
-
AuthorPosts
-
October 29, 2015 at 2:57 pm #1020048
Steven
ParticipantI see other threads with similar issues over the months, but no clear solution I might consider. Also, I am not a developer, and have limited coding skills.
Suddenly, as of 4:30 pm this afternoon, Previous and Next buttons ceased to function in List view on my site, theAgeofLoveMovie.com (page is called ‘Screenings’). No one has access, is/has changed settings or is working on any part of the site, though I did successfully add a new event shortly before the issue began. No changes or updates have been applied in recent months, as all has been working properly (Event Cal Pro v. 3.9.1).
Next/Previous Week and Next/Previous Month still work as expected.
No other plug-ins have been installed or upgraded in months (until after this problem appeared), and no other issues are occurring on the site that I can find.
Is there any help you might offer? It’s a custom theme I did not build. But nothing at all has been changed/updated/worked on in the site in recent months. With thanks….
October 29, 2015 at 3:48 pm #1020076Steven
ParticipantThe links began working again at 6:41, as I was inspecting code using the developer console. Nothing was changed. Then the issue recurred, a minute later.
I do see, upon clicking these links, the following alert appears in the console:
Uncaught InvalidValueError: not an Object(anonymous function) @ js?sensor=false&ver=3.8.3:38M @ js?sensor=false&ver=3.8.3:42(anonymous function) @ tribe-events-ajax-maps.min.js?ver=3.9.1:1c @ jquery.js?ver=1.10.2:3p.fireWith @ jquery.js?ver=1.10.2:3x.extend.ready @ jquery.js?ver=1.10.2:3q @ jquery.js?ver=1.10.2:3
Any thoughts on what’s going on?
October 29, 2015 at 4:24 pm #1020094Brian
MemberHi,
Thanks for using our plugins.
Google has changed their API and it is causing this issue.
Pro 3.12.5 fixes this.
Since you are on 3.9 still you could try this snippet first instead of upgrading:
/**
* Null values in the geoloc estimates can cause breakages with the
* current Google Maps scripts; this helps to ensure that is avoided
* by effectively casting nulls to zeroes.
*
* @param array $geocords
*
* @return array
*/
function temp_fix_geocoords_breakage( $geocords ) {
return array_map( 'floatval', $geocords );
}
add_filter( 'transient_geoloc_center_point_estimation', 'temp_fix_geocoords_breakage' );Add that to your theme’s functions.php and let me know if that helps.
Thanks
October 29, 2015 at 6:07 pm #1020121Steven
ParticipantThat works, yes, thank you for answering and having the right info!
Before I close out, do you suggest staying with the older Events plug-in I have, as I’m not able to troubleshoot in JS/PHP if new issues arise — or will I run into an increasing number of errors as other software is updated, such as Google was?
Is the update simply a matter of clicking on the ‘update plug-in’ link? And, if I do that, could my data/layout/functionality be altered in a way I’d need a programmer to fix?
Thank you!
October 30, 2015 at 5:07 am #1020188Brian
MemberHi,
I think it is a good idea to update as in the future we might not have a solution to fix this for an older version. The biggest update was from 3.9 to 3.10, which changed a lot of the structure of the plugin.
If you do not have any custom templates in your theme (yourtheme/tribe-events/) or any other custom functions you should be good to update and it can be as easy as clicking the button.
The data of the plugin should not be changed or the layouts if again you do not have any custom templates.
What is your theme? Some themes do include custom templates if you have not added any.
Also, do you have many recurring events?
Those two are the usual areas something could go wrong in rare instances.
Let me know.
We are releasing 4.0 soon and doing our final testing on it. It might be a good idea to wait until that is out for a couple weeks and update everything then.
Thanks
November 6, 2015 at 9:39 am #1022607Steven
ParticipantThis fix solves the navigation issue, but a warning is now intermittently displayed across the top of the webpage:
Warning: array_map(): Argument #2 should be an array in /home/ageofloveadmin/public_html/wp-content/themes/src/functions.php on line 70
Line 70, from the code you provided that I cut and pasted, is: return array_map( ‘floatval’, $geocords );
November 6, 2015 at 10:26 am #1022620Brian
MemberHi,
If you have upgraded to the latest version you should remove that snippet as it is no longer needed.
Let me know if on the latest version and removing that snippet everything works.
Thanks
November 6, 2015 at 11:08 am #1022626Steven
ParticipantI did not upgrade the software, as I’m worried, without a coder on board (and using a customized template) that unexpected, hard-to-fix errors might appear on this all-important web page.
This PHP Warning only showed up after I was using your fix for a week, and it’s intermittent. Do you have any ideas what it refers to and how to tweak it to remove the Warning?
With many thanks….
November 6, 2015 at 11:48 am #1022641Steven
ParticipantThat is, to simply clear the warning, is there a way to tweak your code snippet so that, in this array_map(), Argument #2 is an array?
The link that’s failing:
return array_map( ‘floatval’, $geocords );
November 8, 2015 at 5:35 pm #1023091Brian
MemberHi,
It is a warning and not an error.
So if you turn off debug in your wp-config.php it should not show.
The warning is because the variable is a string and not an array.
You could wrap it like this to stop the warning:
if ( is_array( $geocords ) ) {
return array_map( ‘floatval’, $geocords );
}
Not sure how that will work though or the other side effects of it.
Thanks
November 15, 2015 at 8:00 pm #1026089Steven
ParticipantBrian –
Since I’m not a PHP coder, could you possible provide all three lines of replacement code you’re suggesting when you say to “wrap it and stop the warning”? When I do the following (which is what I thought you meant), it breaks the plug-in:
function temp_fix_geocoords_breakage if (is_array( $geocords )) {
return array_map( ‘floatval’, $geocords );
}
add_filter( ‘transient_geoloc_center_point_estimation’, ‘temp_fix_geocoords_breakage’ );Also, I’d love to upgrade the plugin, but am concerned about how the events display in the custom template might be affected (without a coder on board). Is there a document that explains what specifically is changed in the new version, and points out potential areas of concern? Thank you! S.
November 16, 2015 at 1:24 pm #1026590Brian
MemberThis might work:
function temp_fix_geocoords_breakage( $geocords ) {if ( is_array( $geocords ) ) {
return array_map( 'floatval', $geocords );
}}
add_filter( 'transient_geoloc_center_point_estimation', 'temp_fix_geocoords_breakage' );
Unfortunately, we do not provide a detailed guide of what changed. The only method available is to compare the functions in the customizations you have to the latest templates and see what is different. It is hard for us to tell what is changed so we are limited in providing much help, but I can try to help out. ‘
Thanks
November 16, 2015 at 2:57 pm #1026624Steven
ParticipantThank you for the new idea on eliminating the warning. However, this code throws a new warning:
Warning: array_map() expects parameter 1 to be a valid callback, function ‘‘floatval’’ not found or invalid function name in /home/ageofloveadmin/public_html/wp-content/themes/src/functions.php on line 75
(Line 75 is “return array_map( ‘floatval’, $geocords );”Wondering, as I didn’t see this issue discussed in the forum – did the Google API update cause a problem for others using this version of Events Calendar? Any ideas from co-workers (other than updating the plugin)?
Also, what is the code you mention earlier that turns warnings off? With thanks…
Steven
November 16, 2015 at 3:31 pm #1026639Steven
ParticipantNot sure if changing the quotes to straight (from curly) affects anything, but your fix seems to be working now. I will keep an eye on it to make sure — and look into updating the plug-in, as suggested. Thank you!
November 16, 2015 at 4:19 pm #1026653Brian
MemberYeah, changing those quotes would help. I went back and fixed it in the snippet so it is all using ‘ now.
We do not support older versions of the plugin so updating is the only option that we provide beyond this snippet here.
Cheers
-
AuthorPosts
- The topic ‘Previous and Next buttons (suddenly) not navigating from initial page in List’ is closed to new replies.
