Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I have a repeating region. Couch is executing the "cms:editable" part, the field definitions, near the top of the page. Here's that part:

Code: Select all
<cms:repeatable name='news_items' >

    <cms:editable name='news_heading' label="Headline for this news item." type='text' />
    <cms:editable name='news_bodytext' label="The paragraph(s) that make up this news item." input_width='300' type='nicedit' />
    <cms:editable name='news_link_intro' label="Optional preamble announcing link." type='nicedit' />
    <cms:editable name='news_link_url' label="Optional link associated with this news item." type='text' />
    <cms:editable name='news_link_linktext' label="Optional link text for the url, if different from url itself." type='text' />

</cms:repeatable>


But it's leaving the "show" part entirely untouched. I can see the couch codes still in the source view of the outputted web page. Here's the "show" part:

Code: Select all
<cms:show_repeatable 'news_items' >

    <article>

        <h2><cms:show news_heading /></h2>

        <p><cms:show news_bodytext /></p>
       
        <cms:if "<cms:not_empty news_link_url />"><p></cms:if>

            <cms:show news_link_intro />
                <cms:if news_link_intro ><br /></cms:if>
            <a href="<cms:show news_link_url />"><cms:if news_link_linktext ><cms:show news_link_linktext /><cms:else /><cms:show news_link_url /></cms:if>

</a></p>

    </article>

  </cms:show_repeatable>


In Admin, I can successfully enter the text for the various fields, so I do have a set of data entered that the Admin panel has saved and is happy with. But Couch isn't seeing or processing the "show_repeatable" section of my page.

All I'm seeing is some empty space at the top of my page. (Due to some html <p>s and stuff that are contained in the show_repeatable block.)

Any ideas what I might be doing wrong?
Hi @Couchclass

Can you please try placing a
Code: Select all
<cms:dump />


inside of the show_repeatable block and let me know if couch renders the tag or doesn't process it.

EDIT: In fact, in your source code, you only see one iteration? This would indicate the show_repeatable block is not executing whatsoever. Please paste your entire template code here and I'll take a look. Also, which couch version are you using?
Image
Thanks for your reply.

Looks like I'm using version 1.4.7. I just downloaded it from the Couch web site two or three days ago.

Adding the <cms:dump /> tag inside the show_repeatable block was a good thought. Turns out, it went unprocessed like all the rest.

Also, there weren't any iterations (of entered row data) at all in the the outputted page. Nothing inside the "show_repeatable" block was actually executed. The following code shows the "show_repeatable" block as it looks in the html source of the outputted, finished web page:

Code: Select all
<cms:show_repeatable 'news_items' >

    <cms:dump />

    <article>

        <p><cms:show k_count /> / <cms:show k_total_records /></p> <!-- I had added this line to check whether these variables existed, but no ... these commands weren't executed any more than the others inside this repeatable block. -->

        <h2><cms:show news_heading /></h2>

        <p><cms:show news_bodytext /></p>
       
        <cms:if "<cms:not_empty news_link_url />"><p></cms:if>

            <cms:show news_link_intro />
                <cms:if news_link_intro ><br /></cms:if>
            <a href="<cms:show news_link_url />"><cms:if news_link_linktext ><cms:show news_link_linktext /><cms:else /><cms:show news_link_url /></cms:if>
</a></p>
    </article>

  </cms:show_repeatable>


This page is called news.php, and it includes the required "include" and "invoke" codes at top and bottom. Other Couch tags on the same page are working fine.
This is very strange indeed. Please post the entire template file so that I can check there is nothing else wrong that may cause strange behavior. Outside of that, I can offer little help without checking the problem out for myself first hand.

Please do also check if there any errors in your error logs.
Image
I began stripping away html from my news.php page (including things that were parts of server-side includes), and find that the repeatable region now works!

But I have to figure out which particular thing I stripped out was the cause. Working on that.

Thanks for your help so far, Bartonsweb.
OKAY! Mystery solved!

Here was the problem:

My web page, "news.php," contains some regular PHP server-side includes.

One of those server-side includes needed to include some Couch content, so I had put the "Couch include" and the "Couch invoke" tags into it. Apparently, I guess, those were screwing things up. After I removed the Couch invoke stuff from the ssi, everything works beautifully.

IMPORTANT QUESTION, THEREFORE: Can I use Couch regions inside a server-side include that will be incorporated into a web page that already has its own Couch invoke going on? If the PHP include gets processed before any Couch processing, I guess it could display any fields already defined elsewhere, but it couldn't contain any <cms:editable /> tags of its own, since -- because it can't have Couch invokes in it -- the Couch admin panel could never "see" and recognize those editable Couch tags.

Hmm.

Thanks again for your assistance, Bartonsweb.
6 posts Page 1 of 1