Viewing 15 replies - 16 through 30 (of 44 total)
  • I’ll check that out, will let you know what I find out.

    It appears that having a column named “desc” interferes with the Paragraph text WYSIWYG editor javascript. This is an issue that will be completely fixed going forward after Pods 2.0, but for now you’ll want to avoid it. “desc” is a class that’s referenced in the form and is the internal name for the Paragraph text column type.

    Outside of this, let me know if you have any further issues.

    Thread Starter Cristiano

    (@iclapton)

    Yes, that was the problem. With so many names to choose, I used the forbidden one! hehe now its ok! Thanks!

    One more issue:
    I underestand the “permalink” is auto-generated when you don′t define it. I′m using the “Monday by Noon” tutorial:https://mondaybynoon.com/2010/01/04/pulling-pods-data/

    When I try to pull the permalink, it comes empty. The code is basically that:

    <?php
      $pesquisas = new Pod('pesquisas');
      $pesquisas->findRecords('name ASC');
      $total_pesquisas = $pesquisas->getTotalRows();
    ?>
    
    <?php if( $total_pesquisas>0 ) : ?>
      <ul>
        <?php while ( $pesquisas->fetchRecord() ) : ?>
    
        <?php
        // set our variables
        $pesquisa_slug    = $pesquisas->get_field('permalink');
        ?>
    
        <li>
          <a href="<?php echo get_permalink(); ?><?php echo $pesquisa_slug; ?>/">
          <?php echo $pesquisa_nome; ?>
          </a>
        </li>
        ...

    But the <?php echo $pesquisa_slug; ?> doesn′t get anything…
    I′m doing something wrong? Its a .htaccess problem or something like that? My normal wp permalinks are working well…

    Thread Starter Cristiano

    (@iclapton)

    I forgot to put here the set of the $pesquisa_nome but it is ok on the code. $pesquisa_nome = $pesquisas->get_field(‘name’);

    Did you add the permalink after you added items to your pod? Permalinks are generated on saving a pod item, and are not retroactively set when adding the column after you have existing pod items.

    Thread Starter Cristiano

    (@iclapton)

    Tried both:
    $pesquisa_slug = $pesquisas->get_field('permalink');
    and
    $pesquisa_slug = $pesquisas->get_field('slug');
    Nothing happens… do I need to have a permanlink field on the slug to work?

    Thread Starter Cristiano

    (@iclapton)

    sorry, I mean “do I need to have a permanlink field on the POD to work?”

    You need to have a permalink / slug field (named whatever you need) before you can use it. You can only have one field of that type on a Pod.

    Thread Starter Cristiano

    (@iclapton)

    hummm… it′s a little bit dangerous, imagining that the customer isn′t familiar with it and he will have a blank field that he should never fills it…

    Is there any chance to have it invisible to the user/customer?

    Definitely, try installing Pods UI – https://www.ads-software.com/extend/plugins/pods-ui/

    You can then setup a new plugin using code like found on this page:

    https://ui.podscms.org/user-guide/pods_ui_manage/

    You can also check out the Pods UI Demo plugin that’s included with Pods UI.

    Thread Starter Cristiano

    (@iclapton)

    Cool! I will try it! ??

    I have another issue:
    Its already generating the slug and finding the pod page (with a template). But I get a fatal error:
    Fatal error: Call to a member function get_field() on a non-object in /myweb.com/wp-content/themes/default/template_cadapesquisa.php on line 20

    The line 20 on the template file is the first set of variables:
    $pesquisa_id = $pesquisas->get_field('id');

    Thread Starter Cristiano

    (@iclapton)

    The complete template page code:

    <?php
    
    /* Template Name: Cada Pesquisa */
    
    get_header(); ?>
    
      <?php
    
        $found_pesquisa = false;
    
        global $pods;
        $pesquisa_slug  = pods_url_variable(-1);
        $pesquisa       = new Pod('pesquisas', $pesquisa_slug);
    
        if( !empty($pesquisa->data ) )
        {
          $found_pesquisa = true;
    
          // set our variables
          $pesquisa_id      = $pesquisas->get_field('id');
          $pesquisa_nome    = $pesquisas->get_field('name');
          $pesquisa_data    = $pesquisas->get_field('data');
          $pesquisa_arquivo = $pesquisas->get_field('arquivo');
    	  $pesquisa_slug    = $pesquisas->get_field('permalink');
    
          // data cleanup
          $pesquisa_arquivo = $pesquisa_arquivo[0]['guid'];
        }
      ?>
    
      <div id="content" class="narrowcolumn" role="main">
    
        <?php if( $found_pesquisa ) : ?>
    
          <div class="post" id="post-<?php echo $pesquisa_id; ?>">
            <h2><?php echo $pesquisa_nome; ?></h2>
            <div class="entry">
              <h4><?php echo $pesquisa_data; ?></h4>
              <?php if( !empty( $pesquisa_arquivo ) ) : ?>
                <a href="<?php echo $pesquisa_arquivo; ?>"><img src="https://www.cristianoandrade.com.br/nutrittion/wp-content/themes/default/images/download-icon.png" alt="Download arquivo da Pesquisa <?php echo $pesquisa_nome; ?>" /></a>
              <?php endif ?>
            </div>
          </div>
    
        <?php else: ?>
    
          <div class="post">
    	    <h2>Pesquisa n&atilde;o encontrada</h2>
    	    <div class="entry">
    	      <p>Desculpa, essa pesquisa n&atilde;o foi encontrada</p>
    	    </div>
    	  </div>
    
        <?php endif ?>
    
      </div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    You are referencing $pesquisas for your Pod, but then you’re using $pesquisa when you define your Pod. Try using one of the two for your variable name across the board.

    Thread Starter Cristiano

    (@iclapton)

    Thats true! Sorry!
    Thank you again

    No problem at all ??

Viewing 15 replies - 16 through 30 (of 44 total)
  • The topic ‘[Plugin: Pods CMS] Install Problems’ is closed to new replies.