aafhhl

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • in reply to: SQL error syntax triggered by Monthly view #1121072
    aafhhl
    Participant

    Thanks 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_table

    This 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 name

    So 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/jrboulet

    I just try to help to fix this bug because bugs have been invented to be fixed !!!
    😉

    in reply to: SQL error syntax triggered by Monthly view #1120566
    aafhhl
    Participant

    Hi,

    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 table

    I 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 _EventStartDate

    You 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.
    in reply to: SQL error syntax triggered by Monthly view #1119679
    aafhhl
    Participant

    I 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 suggest

    Thanks for cooperation

    in reply to: SQL error syntax triggered by Monthly view #1119349
    aafhhl
    Participant

    Hi,

    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_date

    To fix the code, just replace :
    SELECT DISTINCT home_posts.*, MIN(home_postmeta.meta_value) as EventStartDate, MIN(tribe
    _event_end_date.meta_value) as EventEndDate

    by this :
    SELECT DISTINCT home_posts.*, MIN(tribe_event_end_date.meta_value) as EventStartDate, MIN(tribe
    _event_end_date.meta_value) as EventEndDate

    And 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 code

    in reply to: SQL error syntax triggered by Monthly view #1116271
    aafhhl
    Participant

    This reply is private.

    in reply to: Bug in permalink generation #1096251
    aafhhl
    Participant

    Hi,

    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 ?

    aafhhl
    Participant

    Precision :

    ==> 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 OK

    This problem is still present with wordpress theme Twenty Fiveteen
    and with only The Events Calendar and The Events Calendar PRO activated

    Can you confirm ?

    aafhhl
    Participant

    I 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 activated

    Can you confirm ?

    in reply to: Bug in permalink generation #1094365
    aafhhl
    Participant

    Hi,

    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

    aafhhl
    Participant

    Hi,

    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 tag

    I did not customized this agenda view and this was working with previous version 4.0.7 version.

    SO seems to be a regression …

    in reply to: Bug in permalink generation #1093339
    aafhhl
    Participant

    Just 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 function

    aafhhl
    Participant

    Have you been able to reproduce the problem of missing event links in the agenda view displayed on mobile ?
    using this link ? :

    https://www.happyhumanlinks.ch/aaf-events/mois/

    in reply to: Bug in permalink generation #1093311
    aafhhl
    Participant

    FYOI 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.

    aafhhl
    Participant

    To 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 ?

    aafhhl
    Participant

    To 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

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