Support » Plugin: WordPress Infinite Scroll - Ajax Load More » Error Writing File: My code won't save even after changing permissions

  • Resolved databell96

    (@databell96)



    I’m trying to save my repeater template but every time I try to save it, it doesn’t save and instead I get the dreaded “Error Writing File” issue. Changed my permissions to 777 in my wp-content, plugins, AjaxLoadMore, core and repeater folders, but still no luck. Did I forget to do something? I even tried code that worked on another ALM site and it wouldn’t save either. Regardless, and not taking any chances, here’s the current code:

    <a href="<?php echo get_permalink( $ID ); ?>" title="<?php the_title( ); ?>">
    <?php if (has_post_thumbnail( $post->ID ) ): ?>
    <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
    <?php endif; ?>
    <div class="feature" style="background: url(<?php echo $image[0]; ?>) no-repeat top center!important; background-size: cover!important;">
    <div class="feature-bottom"><?php $current_cat_id = the_category_ID(false); echo '<h3>' . get_cat_name($current_cat_id) . '</h3>';  ?><h2><?php echo get_the_title( $post->ID ); ?> </h2></div>
    </div>
    </a>

    https://wordpress.org/plugins/ajax-load-more/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author dcooney

    (@dcooney)

    Hi databell96,
    I tested your template and I too had issues.

    I re-worked it a bit and this was able to save.

    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    	<?php if (has_post_thumbnail() ){
    			global $post;
    			$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
    		}
    	?>
    	<div class="feature" style="background: url(<?php echo $image[0]; ?>) no-repeat top center!important; background-size: cover!important;">
    		<div class="feature-bottom">
    			<?php $current_cat_id = the_category_ID(false); ?>
    			<h3><?php echo get_cat_name($current_cat_id); ?></h3>
    			<h2><?php the_title(); ?> </h2>
    		</div>
    	</div>
    </a>

    Let me know if this works!

    Cheers,

    No! Still getting the Error Writing File message. So it’s not saving for me.

    Plugin Author dcooney

    (@dcooney)

    That sucks. I tested it on 3 different in sites on different servers.

    Plugin Author dcooney

    (@dcooney)

    Maybe you could try the Local Template alternative.
    https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template

    Loads from your theme directory.

    That’s a good idea. Unfortunately, I don’t have control over this server (it’s RackSpace, which I’m not a fan of) so someone else needs to change the permissions and I don’t think he has yet. I’ll try your other method shortly and report back.

    Yay! It worked! Problem solved. Thank you!

    Plugin Author dcooney

    (@dcooney)

    Sweet!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error Writing File: My code won't save even after changing permissions’ is closed to new replies.