• 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 6 replies - 31 through 36 (of 36 total)
  • Plugin Author Evan Herman

    (@eherman24)

    After some thought, it’s possible that the template file you are using is the proper one.

    Is there a loop going on inside of that file?

    Something like:

    if ( have_posts() ) {
       while ( have_posts() ) {
         // etc.
       }
    }

    I believe this is required for the timeline announcement content to be properly retrieved and displayed on the page.

    Thread Starter Ron B

    (@rwbroome)

    It is the “single-timeline-express.php” file I copied from the template directory of the plugin. The code is:

    get_header(); ?>
    
    <div id="primary" class="content-area timeline-express-content-area">
    	<main id="main" class="site-main timeline-express-main" role="main">
    		<?php
    		// Start the loop.
    		while ( have_posts() ) : the_post();
    
    			?>
    			<header class="entry-header">
    				<?php the_title( '<h2 class="entry-title">Film: ', '</h2>' ); ?>
    			</header><!-- .entry-header -->
    
    			<div class="entry-content">
    			<?php
    				// Include the single post content template.
    				get_timeline_express_template( 'single-announcement' );
    			?>
    			</div>
    
    		<?php
    		// End of the loop.
    		endwhile;
    		?>
    
    	</main><!-- .site-main -->
    </div><!-- .content-area -->
    
    <?php get_footer(); ?>

    I changed h1 to h2 and added “Film: “.
    That part works.

    Ron

    Plugin Author Evan Herman

    (@eherman24)

    Inside of your theme, what are the template files there? Do you see a single.php? Try using that template, and replacing the_content() or get_template_part().

    Evan

    Thread Starter Ron B

    (@rwbroome)

    So, I determined that the “single-timeline-express-content.php” file is loading. It seemed like it was/should be, but I couldn’t see any effects of mods from the “single-timeline-express-content.php” file. (Lot of old-school inserting of echo’s to find that out).

    Okay, so I figured it out. I should have figured it out sooner, but didn’t realize how wound up some things got.

    1) There was a collision between template loads for single TE posts that I had created as a workaround for when TE version 1.1.x didn’t support a single post template. I was loading another template, that now didn’t load with your new one, but it looked like single.php was loading (which I don’t actually use anywhere). I unwound that change, and the “single-timeline-express-content.php” file loaded without an issue, but I still could not see that because…

    2) Regardless of image size you retrieve with
    timeline_express_get_announcement_image( get_the_ID(), 'full' ), the size of the image is now set to display width:100% by the announcement-banner-image class in 1.2.x TE CSS. I did not see that because I was overriding the image size a different way during the older version of TE. The image size looked like the default single.php and had the same lack of CSS or wrapper classes.

    It would probably be good to remove the width:100% as this sort of defeats having a flexible image size load. Perhaps max-width:100% width:auto )

    and…

    3) the <strong class="timeline-express-single-page-announcement-date"> class tag in line 26 of “single-timeline-express-content.php” sets display:block. This was being re-styled in my older version to handle changes my client wanted, but this caused a display position problem in this new version…and weirdly it wasn’t showing in the CSS inspection.

    ————————-

    The short of it is that it now all works, once I figured out to unwind ALL of my previous TE 1.1.x kluges.

    I probably would have seen this sooner, but I’m multi-tasking under the gun to get this project wrapped. Never fun when new updates to stuff happens just before a release.

    The way you have the plugin now really is way better.

    So, sorry, for having this chasing our tails. Arrrggg.

    Ron

    Thread Starter Ron B

    (@rwbroome)

    One last thought.

    While the images should be sized to width:auto, really with what you are trying to do, you should consider using the srcset attribute and just make it automatic. Better for responsive websites.

    Ron

    Plugin Author Evan Herman

    (@eherman24)

    Ah that makes complete sense. Sorry there was so much trouble during the migration, but I’m glad you finally got things sorted – and helped me catch a few bugs along the way.

    I will look into implementing the srcset attribute for responsive images. That’s a good point. And I’ll get the width auto set up in the next patch.

    Thanks again,

    Evan

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