• Resolved Ron B

    (@rwbroome)


    Hi Evan,

    Several problems that started with 1.2.5 (not a problem in 1.2.4 when I roll back plugin). This is on a staging site on my local computer.

    ——————————-

    (1)
    On FIRST post (ONLY) of timeline, I get an error and the excerpt doesn’t display AND the “Read More” url goes back to the page on which the shortcode is inserted. The error I get:

    ( ! ) Warning: date() expects parameter 2 to be long, string given in C:\Users\Ron\Documents\Websites\www.xxxxxxxxxx.dev\GWFA-EW\wp-includes\functions.php on line 112 Call Stack # Time Memory Function Location 1 0.0051 177216 {main}( ) ..\index.php:0 2 0.0054 179304 require( ‘C:\Users\Ron\Documents\Websites\www.xxxxxxxxxx.dev\GWFA-EW\wp-blog-header.php’ ) ..\index.php:17 3 0.8997 26847320 require_once( ‘C:\Users\Ron\Documents\Websites\www.xxxxxxxxxx.dev\GWFA-EW\wp-includes\template-loader.php’ ) ..\wp-blog-header.php:19 4 0.9079 27151592 include( ‘C:\Users\Ron\Documents\Websites\www.xxxxxxxxxx.dev\GWFA-EW\wp-content\themes\jumpstart\template_builder.php’ ) ..\template-loader.php:75 5 1.4112 28801200 […]

    ——————————-
    (2)
    On subsequent posts of the timeline, the “Read More” link goes to the correct post page, but the post does not display.

    ——————————-

    I am using your “timeline-express-container.php” file in a timeline-express folder in my child theme (with two customizations, one adding a class so I can customize CSS of the fly-in post box, the other adding the permalink to the title of the post). Using just your unadulterated “timeline-express-container.php” file (1.2.5) in my child theme does NOT fix this problem.

    I am NOT using a “single.timeline-express.php” file in my my child theme.

    I also was using the following custom code in functions.php of my child theme, but removing it does not affect anything either:

    //  CHANGE SLUG
    function gwfa_change_timeline_express_slug_fn ( $slug ) {
    
        $slug = 'animation-timeline';    // slug for timeline
        return $slug;
    }
    add_filter('timeline-express-slug', 'gwfa_change_timeline_express_slug_fn' );
    
    // alter 'Read more' to say 'More ->'
    function gwfa_change_timeline_express_readmore_text_fn ( $translated_text, $untranslated_text, $domain ) { 
    
        switch( $untranslated_text ) {
            case 'Read more':
              $translated_text = __( ' More ☛','timeline-express' );   //
            break;
         }
       return $translated_text;
    }
    add_filter('gettext', 'gwfa_change_timeline_express_readmore_text_fn', 20, 3);
    
    // add a custom class to the timeline express readmore link
    function gwfa_add_timeline_express_custom_readmore_class_fn ( $button_classes ) {
        return $button_classes . 'gwfa_timeline_express_readmore_btn';
    }
    add_filter( 'timeline-express-read-more-class' , 'gwfa_add_timeline_express_custom_readmore_class_fn' );

    ——————————-

    Everything worked in 1.2.4 great (even excerpt problem I reported in 1.2.1) , but this is now broken in 1.2.5.

    Thanks,
    Ron

    https://www.ads-software.com/plugins/timeline-express/

Viewing 15 replies - 1 through 15 (of 36 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi Ron,

    One other user reported this in 1.2.4, I think it has something to do with the way the dates are now being stored.

    Does the error persists if you go back in and re-update a post? Is this happening with existing posts, or new posts?

    In regards to the content not loading – this seems to be an issue with certain themes. I was working with another user who had the same issue in 1.2.4/1.2.3, and the 1.2.5 alterations seemed to fix it for them (and any other themes I tested with).

    What theme is it that you are working with, so I can start testing against it?

    I am going to setup a test instance and see if I can replicate this date issue, as well.

    Thanks,
    Evan

    Thread Starter Ron B

    (@rwbroome)

    It was fine for me in TE 1.2.4 (I can rollback to that and everything works).

    It does not appear to be an re-update post problem. I can update the same post and see the same problem. Also, I can trash the post, and the problem appears again with the new first post. (Sort order “Ascending”). The error I sent displays only appears in whatever is the first post. It does not appear to be a new vs. old post issue.

    I am using JumpStart 2.1 from ThemeBlvd (wpjumpstart.com). It’s a well-coded theme/framework.

    Ron

    Thread Starter Ron B

    (@rwbroome)

    Also, I tried adding the “single.timeline-express.php” file to my child theme timeline-express folder. I also tried removing the template files and the timeline-express folder altogether from my child theme.

    Neither affected the problem in 1.2.5.

    ————————-

    Note: JumpStart does something unique which is that it uses the standard WP template mechanism, but the WP templates (ie., single.php) serve as a wrapper for the WP loop that then calls customizable framework specific files (ie., content-single.php) that just contains div blocks and WP post/content code. (Saves mucking up the WP templates incorrectly.)

    But this didn’t seem to be a problem in 1.2.4.

    Ron

    (I have to go to a meeting, so I may not be able to respond for a couple of hours)

    Plugin Author Evan Herman

    (@eherman24)

    For the content issue, inside of ‘/lib/classes/class.timeline-express-public.php’, on line 24, can you try removing the ‘0’ from the end of the line (and the comma), so it reads:

    add_filter( 'the_content', array( $this, 'timeline_express_single_page_content' ) );

    Example:
    https://github.com/EvanHerman/timeline-express/blob/master/lib/classes/class.timeline-express-public.php#L24

    That may be the issue with the content not displaying.

    Evan

    Thread Starter Ron B

    (@rwbroome)

    Hi Evan,

    So this may not be what you expected, but it fixes the FIRST timeline post problems that I described. The error message on the first post went away and the “Read More” now set the correct post URL (instead of pointing back to the page containing the shortcode).

    Strangely, it does NOT, HOWEVER, fix the problem of single posts not displaying (as linked from all timeline page posts including first) given the use of the the_content filter.

    Possible problem in the timeline_express_single_page_content callback function? Perhaps something here might help… https://pippinsplugins.com/playing-nice-with-the-content-filter/

    Hope this helps.

    Ron

    Plugin Author Evan Herman

    (@eherman24)

    Hi Ron,

    Go ahead and update to 1.2.6. I’ve done some work on my end to ensure that things work globally. Please re-test and let me know if you are still running into issues. I believe the date issue is also resolved.

    I am now handling things completely different.

    Thanks,
    Evan

    Thread Starter Ron B

    (@rwbroome)

    Hi Evan,

    I updated to 1.2.6 and that fixes all of the problems on the timeline (shortcoded) page that I reported. I added my filters back (above) and that all works too.

    The posts do now come up from the Read More links.

    Thanks.
    ———————
    However, in the TE single posts, the date does not display and the image is full width.

    Looking at the CSS it appears TE is just invoking the standard single.php template.

    I see you have a new “single-timeline-express-content.php” TE template. I copied that to my child theme timeline-express folder, but that does not appear to be getting invoked.

    Thoughts? Am I missing a step? (Also putting “single-timeline-express.php” in my child theme timeline-express folder makes no difference.)

    Does the
    get_timeline_express_template( 'single-announcement' );
    line in “single-timeline-express.php” affect this somehow?

    Thanks again,
    Ron

    P.S. (1) the documentation on single post customizing is getting a little confusing (different pages saying different things).
    (2) also Documentation Button link on the TE Settings Page is broken – it prepends my admin URL to your doc page URL:

    https://www.xxxxxxxx.dev/GWFA-EW/wp-admin/www.wp-timelineexpress.com/documentation/

    Plugin Author Evan Herman

    (@eherman24)

    Hey Ron,

    Take a look at this documentation that I wrote:

    https://www.wp-timelineexpress.com/documentation/customize-single-announcement-template/

    Since you seem to know what you are doing, these are the basics:

    Duplicate your themes single.php into the ‘timeline-express’ directory.
    Rename it single-timeline-express.php
    Replace the_content() or get_template_part() with timeline_express_content();.
    Save the template, and re-fresh any single announcement page.

    In regards to the URL, that’s odd. I will certainly take a look. I hadn’t noticed that before.

    Thread Starter Ron B

    (@rwbroome)

    I’d also consider moving <header> tag, the_title and <div class="entry-content> (all the stuff inside the loop), so that it can be all modified in one place (and “single-timeline-express.php” is not unnecessarily exposed to erroneous changes).

    -R

    Thread Starter Ron B

    (@rwbroome)

    I was looking at

    https://www.wp-timelineexpress.com/documentation/how-do-i-customize-the-single-announcement-content/

    Kind of why it’s getting confusing.

    When do I use that versus what you have above?

    -R

    Plugin Author Evan Herman

    (@eherman24)

    The content and the page template contain two sets of markup.

    The page template is just that – a template which calls the timeline express announcement content into the page template.

    The single-timline-express-content.php is just the content (title, image, date etc. etc.) without any of the page markup.

    This file was included to allow users to duplicate an existing template (single.php, page.php etc.) but include the timeline announcement content.

    There was no easy way to include a template that matched all themes in the repository. I did my best to mockup a default template that may or may not fit into the given theme. I took the page markup from the bundled Twenty Sixteen theme.

    If you wanted to alter the markup you would copy over the timeline-express-content.php template, and if you just wanted to alter the page template (eg: add a sidebar, add classes to the parent container etc.) you would alter single-timeline-express.php. This was done intentionally to split the template, and the content up.

    Most users will have no idea how to alter the bundled template to get it to work with their theme, so instead we wrote out a helper function to pull in the announcement data onto an existing theme template (ie: single.php).

    Evan

    Thread Starter Ron B

    (@rwbroome)

    Hmmm.

    So, let me get clear. There are two options for modifying single post content. (Both models I’m familiar with, as the theme I’m using does this, too.)

    1) Copy my theme’s single.php to my child theme timeline-expess folder, rename it, replace the_content() or get_template_part... with timeline_express_content(), etc.

    or

    2) Copy the “single-timeline-express-content.php” to my child theme timeline-express folder and modify that.

    For what I need, the former (1) is not really needed (overkill), but #2 does not seem to be working (changed the image size to “thumbnail” had no effect and the the date is not displaying).

    It acts like “single-timeline-express.php” is not invoking “single-timeline-express-content.php” (anywhere – either from your plugin template directory or from my child timeline-express folder).

    I can make mods to “single-timeline-express.php” in my folder, but nothing seems to affect “single-timeline-express-content.php”.

    Hope this clarifies the issue I’m seeing.

    Sorry, not trying to be a pain, I like your plugin and want to help.

    Ron

    Plugin Author Evan Herman

    (@eherman24)

    The first method is the only method for customizing the announcement content, as that is the template being referenced.

    If you don’t need to alter any of the announcement data, or move anything around – customizing single-timeline-express-content.php is not necessary – and will do nothing.

    If you have not included single-timeline-express.php in your theme root, then copying over single-timeline-express-content.php and customizing will do nothing.

    They must be used in conjunction.

    If method 2 were an option to customize, there would be no page markup.

    Thank you,
    Evan

    Thread Starter Ron B

    (@rwbroome)

    I do want to modify/move stuff on the single post pages (and add CSS classes).

    I’ve copied “single-timeline-express.php” to my child theme timeline-express subfolder. Modified it – that works. Copied “single-timeline-express-content.php” to same directory. However, it does not seem to get invoked at all (either modified or unmodified).

    Is the
    <strong>get_timeline_express_template( 'single-announcement' );</strong>
    line in “single-timeline-express.php” supposed to invoke “single-timeline-express-content.php”. If so, it does not appear to.

    I think that’s where I’m confused.

    Ron

    Thread Starter Ron B

    (@rwbroome)

    My single post pages

    Have
    title
    full width image
    content

    There is no
    Announcement Date: %s
    display

    Changing
    echo wp_kses_post( timeline_express_get_announcement_image( get_the_ID(), 'full' ) ); to medium has no affect.

    Ron

Viewing 15 replies - 1 through 15 (of 36 total)
  • The topic ‘Problems in v1.2.5’ is closed to new replies.