• Resolved sentux

    (@sentux)


    Hi Rachel

    Just updated to the latest version and it crashed my site with white screen.

    I have now returned to 1.3.1 but my nursery news section is now not showing throughout the site?

    Can you advise? The new version was showing a fatal error in admin ‘T_function’.

    Now i cant get the nursery news back but the other custom post types are working??

    Can you please advise?

    https://wordpress.org/plugins/cpt-onomies/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Can you give me some more details about the error?

    Thread Starter sentux

    (@sentux)

    Hi Thanks for replying

    There is a T_function error something about closing bracket or something on line 1167 (cant remember the exact number).

    I just upgraded a second site and the same thing happened so i have replaced with the older version.

    Thread Starter sentux

    (@sentux)

    Strangely, when i revert back to the old 1.3.1 version, viewing the custom posts stops working on the front end?

    http://www.ims.9gdemo.co.uk/projects doesnt work now?

    The loop code is as follows:

    <?php if (have_posts()) :?>
    
    <?php /// featured project (latest project)
    	$events_query = new WP_Query(array('post_type'=>"projects",'posts_per_page'=>1));
    	if ($events_query->have_posts()) : while ($events_query->have_posts()) : $events_query->the_post(); 
    
    	$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
    ?>
    
        <div class="full-row" id="project-featured-row" style="background-image: url('<?php echo $image[0]; ?>')">
                <div class="featured-content">
                    <div class="container">
                        <h3><?php the_title(); ?></h3>
                        <?php the_excerpt(); ?>
                        <a href="<?php the_permalink() ?>" class="text-button">Read more...</a>
                    </div><!--container-->
                </div><!--featured content-->
        </div><!--featured project-->
    
    <?php endwhile; wp_reset_postdata(); else : ?>
    		None Available.
    <?php endif; // END?>
    
    <ul class="cbp-rfgrid">
    	<?php
        $args = array('post_type'=>"projects", 'offset'=> 1 );
    
        $myposts = get_posts( $args );
        foreach ( $myposts as $post ) : setup_postdata( $post );
        ?>
    
        <li>
            <section class="project-container">
                <a href="<?php the_permalink() ?>">
                   <?php the_post_thumbnail('project-archive-thb');   ?>
                    <div class="project-archive-title">
                        <h3><?php the_title(); ?></h3>
                        <div class="project-button">
                            <a href="<?php the_permalink() ?>" class="button">View project</span>
                        </div>
                    </div><!-- project-archive-title -->
                </a>
            </section>
        </li>
    
    	<?php endforeach;
        wp_reset_postdata();?>
    </ul><!--archive projects--> 
    
    <?php else: // If no news ?>
    <div class="full-row">
        	<div class="featured-content">
    	    	<div class="container">
    
                    <h1>No Projects Available</h1>
                    <p>Please come back later...</p>
    
    	    	</div><!--container-->
        	</div><!--featured content-->
    </div><!--featured project-->
    <? endif; //END LOOP ?>

    I ran your code on my site and got the same error. I changed the last line to

    <?php endif; //END LOOP ?>

    Did that work for you?

    Thread Starter sentux

    (@sentux)

    No sorry. Nothing changed.

    Weird. So you’re still getting the error? Can you see what the specific error is? That would really help.

    Thread Starter sentux

    (@sentux)

    I am indeed.
    This is the 2nd site which it has effected even though i reverted to the old version of the plugin which is weird?

    There is no error showing now just that the custom post types aren’t showing now in the front end?

    I have the same error – Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’ in /…/public_html/wp-content/plugins/cpt-onomies/cpt-onomy.php on line 1163

    What version of PHP are you running?

    I just updated on PHP 5.3.29 and now its working.

    Yea. I think the problem is with the way I use array_map(). I’ll see if I can tweak it a little for backwards PHP compatibility.

    I’ve removed the array_map(). This functionality requires 5.3.0 and WordPress only requires 5.2.4 so I’ve removed it for those who don’t have at least 5.3.0. I’ll push out an update in the next day or 2. If you need the fix before then, download the “Development Version” of the plugin on the Developers page.

    Thread Starter sentux

    (@sentux)

    Hi Thanks Rachel, but this doesn’t explain why the sites have stopped displaying the custom post types even after uploading the older version of the plugin?

    What in the new plugin could have caused a DB change or something that would effect the old plugin version?

    Appreciate the help on this.

    I wonder if your problem might be something outside of CPT-onomies. Your queries are just regular queries and not CPT-onomy queries. Have you installed any other plugins lately? Are you getting any error messages?

    I just updated the development version again. Go grab that and see if it helps.

    FYI: I just pushed out version 1.3.3 with the fix so all should be well. Let me know if you have any issues. Thanks!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Update to 1.3.2 crashed my site’ is closed to new replies.