Forum Replies Created
-
AuthorPosts
-
aafhhl
ParticipantThanks for your answer.
But this is not consistent,
even if the $postmeta_table variable was populated with the correct alias (tribe_event_postmeta) by the function postmeta_tableThis alias supposed to be used (tribe_event_postmeta) would not be associated to any table in the FROM clause of the SQL request
so this will lead to SQL syntax error
As a demonstration, I replaced
MIN(home_postmeta.meta_value) as EventStartDate,
by
MIN(tribe_event_postmeta.meta_value) as EventStartDate,
and submitted the whole request to my SQL console and obviously got a syntax error on this field nameSo the next question is :
by which part of the Query.php code is supposed to be generated in the SQL request
the missing FROM declaration part corresponding to this tribe_event_postmeta alias table declaration ?If this question is the good one, we are going back to my previous suspicion of missing table declaration in this request …
PS : I do respect you seniority,
if you want to know about me as Datawarehouse and Business Intelligence Expert :
https://www.linkedin.com/in/jrbouletI just try to help to fix this bug because bugs have been invented to be fixed !!!
😉aafhhl
ParticipantHi,
I had more investigations and identified the root cause of this problem.
The faulty request, see end of this post for example, is generated by this module :
wp-content/plugins/the-events-calendar/src/Tribe/Query.php
The faulty request field :
MIN(home_postmeta.meta_value) as EventStartDate,is generated by this line of code :
$fields[‘event_start_date’] = “MIN({$postmeta_table}.meta_value) as EventStartDate”;When you read the whole request, you can see than the home_postmeta table is only declared in the FROM clause
to be used for EventEndDate extraction
not for EventStartDate extraction
and then as a consequence the reference to home_postmeta in field name is related to an undeclared tableI suspect than you miss a second instance of this home_postmeta table to be declared as LEFT JOIN
with a condition built to target this _EventStartDateYou clearly have a problem in the logic generation of this SQL request.
and for me this is clearly a nasty BUG==> Please forward to you DEV Team ==> Please forward to you DEV Team ==> Please forward to you DEV Team
——————————————————————————————————————-
SELECT DISTINCT
home_posts.*,
MIN(home_postmeta.meta_value) as EventStartDate,
MIN(tribe_event_end_date.meta_value) as EventEndDate
FROM home_posts
LEFT JOIN home_postmeta as tribe_event_end_date
ON ( home_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDate’ )
WHERE 1=1 AND home_posts.post_type = ‘tribe_events’
AND (home_posts.post_status = ‘publish’ OR home_posts.post_status = ‘complete’ OR home_posts.post_status = ‘paid’ OR home_posts.post_status = ‘confirmed’
OR home_posts.post_status = ‘unpaid’ OR home_posts.post_status = ‘pending-confirmation’ OR home_posts.post_status = ‘cancelled’)
ORDER BY EventStartDate DESC, home_posts.post_date DESC LIMIT 0, 1-
This reply was modified 9 years, 11 months ago by
aafhhl.
aafhhl
ParticipantI cannot have an advice about functional aspects of this request (End date vs Begin date)
But what is sure is that using a real table name when alias have been declared for all tables included in a SQL request always leads to syntax error when using the field name prefixed by real table name
And this is exactly what is done in this request.This SQL request is generated and fired each time the monthly view af calendar is displayed,
then can you point me on the module where this SQL request is generated and executed.I will have more investigation.
If I don’t find the root cause there, I will go to the conflict study you suggestThanks for cooperation
aafhhl
ParticipantHi,
I had more investigation in the SQL request code and found the problem origin :
In field list of the SQL request, your code is using real table name (home_postmeta) instead of its alias table (tribe
_event_end_date) as this alias is generated in left outer join clause :
LEFT JOIN home_postmeta as tribe_event_end_dateTo fix the code, just replace :
SELECT DISTINCT home_posts.*, MIN(home_postmeta.meta_value) as EventStartDate, MIN(tribe
_event_end_date.meta_value) as EventEndDateby this :
SELECT DISTINCT home_posts.*, MIN(tribe_event_end_date.meta_value) as EventStartDate, MIN(tribe
_event_end_date.meta_value) as EventEndDateAnd request is well executed in PHPmyadmin
Next step is now for your dev team :
Find where is generated this SQL request and fix the generation codeaafhhl
ParticipantThis reply is private.
aafhhl
ParticipantHi,
I installed version 4.1.1 of Event calendar, Event calendar PRO, Event Ticket and Event Ticket Plus
and they does not fix this permalink generation bug if the url generated contains dash,
it still contain unwanted backslash character.Do you confirm ?
March 26, 2016 at 2:38 pm in reply to: no more active link on event in calendar view on mobile only #1094476aafhhl
ParticipantPrecision :
==> But While testing I discovered that the weeky view is always empty even when containing events
WHEN DISPLAYED ON MOBILE.
On Normal definition the content of weekly view is OKThis problem is still present with wordpress theme Twenty Fiveteen
and with only The Events Calendar and The Events Calendar PRO activatedCan you confirm ?
March 26, 2016 at 2:34 pm in reply to: no more active link on event in calendar view on mobile only #1094475aafhhl
ParticipantI continued my investigations and here are my last findings :
The problem of missing a href tag was related to Rocket Cache plugin
in which to fix problem, I had to add an exception to prevent Agenda view page to be cached.
You can now check the behavior on :
https://www.happyhumanlinks.ch/aaf-events/==> But While testing I discovered that the weeky view is always empty even when containing envents.
This problem is still present with wordpress theme Twenty Fiveteen
and with only The Events Calendar and The Events Calendar PRO activatedCan you confirm ?
aafhhl
ParticipantHi,
Regarding Revslider I fixed the problem raised by the bad generation of event url by patching the revslider following file :
/wp-content/plugins/revslider/includes/slide.class.php
if(isset($this->params[‘enable_link’]) && $this->params[‘enable_link’] == “true” && isset($this->params[‘link_type’]) && $this->params[‘link_type’] == “regular”){
/* The original code is this line */
$link = RevSliderFunctions::getVal($this->postData, ‘link’);
/* Fixed by JRB for tribe Event url containing dash */
$link = esc_url( get_permalink( $this->id ) );
$this->params[“link”] = str_replace(array(“%link%”, ‘{{link}}’), $link, $this->params[“link”]);As a think for this nice gift,
Please help me to solve the other problem with missing a href link in calendar view displayed on mobile !
Thanks
March 25, 2016 at 12:28 pm in reply to: no more active link on event in calendar view on mobile only #1094233aafhhl
ParticipantHi,
I had more investigations on this problem :
I deactivated the plugin named : The Events Calendar Category Colors
The Big grey dot is back under the date in the agenda monthly view
but this dot is inactive and not associated to a link using a a href tagI did not customized this agenda view and this was working with previous version 4.0.7 version.
SO seems to be a regression …
aafhhl
ParticipantJust a small hint for you :
I took some time to analyze your code
and found several cases of get_permalink function call not enclosed in esc_url functionMarch 24, 2016 at 3:53 am in reply to: no more active link on event in calendar view on mobile only #1093312aafhhl
ParticipantHave you been able to reproduce the problem of missing event links in the agenda view displayed on mobile ?
using this link ? :aafhhl
ParticipantFYOI I always update my customized templates from very last orininal version and I have did than with 4.1 version.
I understood that the this slugs containing dash problem is a known bug
Tell me when it will be fixed.
March 24, 2016 at 2:46 am in reply to: no more active link on event in calendar view on mobile only #1093303aafhhl
ParticipantTo clarify :
the problem is that the a tag containing the url link going to the event is not generated and available from iphone mobile safari browser in the agenda view :https://www.happyhumanlinks.ch/aaf-events/mois/
Am I clear enough ?
March 24, 2016 at 2:41 am in reply to: no more active link on event in calendar view on mobile only #1093299aafhhl
ParticipantTo reproduce the problem :
See the missing in this page from a mobile :
https://www.happyhumanlinks.ch/aaf-events/mois/
Yes we have a tribe-events folder in our Child theme
But the page referenced above is NOT customized on our site.
We customized single-event.php only not the whole calendar view
-
This reply was modified 9 years, 11 months ago by
-
AuthorPosts
