• stever7

    (@stever7)


    Hi,
    I’ve been using ALM for about six months and editing the default template was never a problem until now. The last time I edited the template was back in January. Anyway, now its not letting me save the template at all, whether or I make a change or not. All I get when clicking the save button is “Something went wrong and the data could not be saved.”

    I’ve made all my plugin updates already, so I know I have the most recent version (2.9).

    Do you have any advice? I considered deleting the template and starting over, but I’m afraid I would not be able to save a new template.

    Thanks!

    https://www.ads-software.com/plugins/ajax-load-more/

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

    (@dcooney)

    Hi,
    Can you post your template so I can test it locally?

    Thread Starter stever7

    (@stever7)

    Sure, here it is:

    <div class="topnews-container more-news col-xs-12 col-sm-6 col-md-3 <?php if ( has_post_thumbnail()) { ?>yes-img"<?php } else { ?>no-img"<?php } ?>>
    
          <?php // Top Story Card ?>
        <div class="topstories-card">
          <?php // Top News Image & Headline ?>
          <div class="topnews-img">
            <div class="topnews-cat <?php if ( has_post_thumbnail()) { ?>whitecat"<?php } else { ?>blackcat"<?php } ?>>
              <?php $categories = get_the_category();	if ( ! empty( $categories ) ) {	echo '<a href="' . esc_url( get_category_link( $categories[0]->term_id ) ) . '">' . esc_html( $categories[0]->name ) . '</a>'; }; ?>
            </div>
            <?php if ( has_post_thumbnail()) { ?>
            <div class="tn-img"><a href="<?php the_permalink(); ?>" class="entry-img">
            <?php the_post_thumbnail( 'LatestNews-XSmall' ); ?>
            </a></div>
            <?php } ?>
          </div>
    
          <?php if ( !has_post_thumbnail()) { ?><div class="topnews-textbox"><div class="topnews-text"><?php } ?>
          <h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php if (strlen($post->post_title) > 40) {
    echo substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {
    the_title();
    } ?></a></h1>
          <div class="topnews-author"><?php the_author(); ?></div><div class="topnews-date"><?php echo get_the_date(); ?></div>
          <div class="topnews-excerpt col-md-8">
            <?php if ( has_post_thumbnail()) { ?>
            <p class="short-excerpt"><?php echo get_excerpt(95); ?></p>
            <?php } else { ?>
            <p class="long-excerpt"><?php echo get_excerpt(180); ?></p>
            <?php } ?>
          </div>
          <?php if ( !has_post_thumbnail()) { ?></div></div><?php } ?>
          <?php // END Top News Image & Headline ?>
    
          <?php // Social Icons ?>
          <div class="topnews-social <?php if ( has_post_thumbnail()) { ?>"<?php } else { ?>no-img"<?php } ?>>
            <div class="topnews-social-group">
    
              <div class="topnews-social-icons">
    
              <div class="addthis_toolbox addthis_default_style topnews-share" data-url="<?php the_permalink(); ?>"
        data-title"<?php the_title(); ?>" > <a class="addthis_button_facebook" addthis:url="<?php the_permalink(); ?>" addthis:title="<?php the_title(); ?>" ></a> <a class="addthis_button_twitter" addthis:url="<?php the_permalink(); ?>" addthis:title="<?php the_title(); ?>" ></a> <a class="addthis_button_email" addthis:url="<?php the_permalink(); ?>" addthis:title="<?php the_title(); ?>" ></a> </div>
            </div>
          </div>
          </div>
          <?php // END Social Icons ?>
        </div>
        <?php // END Top Story Card ?>
    
      </div>
    <script language="javascript" type="text/javascript">
    
    function initAddThis()
         {
              addthis.init('.addthis_toolbox')
              addthis.toolbox('.addthis_toolbox');
    
         };
         // After the DOM has loaded...
         initAddThis();
    
    </script>
    Thread Starter stever7

    (@stever7)

    FYI, I’m experiencing the same problem on a staging site. There, I tried deleting the template code, and also tried replacing it with the default code, but neither would let me save the changes.

    Thanks for your help!

    Plugin Author Darren Cooney

    (@dcooney)

    Just tested on my servers. Works over here.
    Can you check your console for errors on save?

    Thread Starter stever7

    (@stever7)

    Thanks for the tip… Here’s what I get after clicking the Save Template button:

    POST https://staging.cudenvertoday.org/wp-admin/admin-ajax.php 400 (Bad Request)
    
    load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.4.2:5
    
    send @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.4.2:5
    
    m.extend.ajax @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.4.2:5
    
    _alm_admin.saveRepeater @ admin.php?page=ajax-load-more-repeaters:429
    
    (anonymous function) @ admin.php?page=ajax-load-more-repeaters:471
    
    m.event.dispatch @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.4.2:4
    
    r.handle @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils&ver=4.4.2:4
    Thread Starter stever7

    (@stever7)

    FYI, I checked to make sure the https://staging.cudenvertoday.org/wp-admin/admin-ajax.php file is on the server, and it is.

    Plugin Author Darren Cooney

    (@dcooney)

    Seems like its probably an issue with your server.

    Can you copy your template to somewhere safe and then to simply if and then save?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Template does not save’ is closed to new replies.