1

It's my first time with EE and I'm modifying the template of an existing blog. It's multilingual so it uses code like {exp:transcribe:replace name='written_by'} to display different texts, in this case, Written by.

On some pages, for example on an article single, this line of code returns Written by as it should.

However, on some pages, for example on the index, it returns M10O93H7PQ09L8X1T49CHY01Z5J4TT91FGFR...

Sample returned HTML code:

<a href="M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfrthe-real-url-appears-here">
    <img src="http://www.website.com/images/image.jpg" />
    <h3>Article title</h3>
</a>

<p>
    M10o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr <a href="/author/jdoe" class="author">Jhon Doe</a>
    M20o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr <span>Feb 25, 2015</span>
</p>

Template code:

{exp:channel:categories show_empty="yes" channel="my_channel" id="categorylist" category_group="11" style="linear"}

    <h1>{category_name}</h1>

    {exp:channel:entries channel="my_channel" category="{category_id}" limit="3" paginate="bottom"}
        <a href="{exp:transcribe:uri path='/article/'}{url_title}">
            {blog_post_main_image}
                <img src="{path}/{filename}.{extension}" />
            {/blog_post_main_image}
            <h3>{title}</h3>
        </a>

        <p>
            {exp:transcribe:replace name='written_by'} <a href="/author/{username}" class="author">{author}</a>
            {exp:transcribe:replace name='on_date'} <span>{entry_date format="%M %d, %Y"}</span>
        </p>
    {/exp:channel:entries}

{/exp:channel:categories}

Any idea why it does that? I tried to search a lot on Google and found nothing that could help me.

Thanks!

  • it's to do with parse order. something is mixed up.Can you try addin a parse="inward" to the exp:channel:entries tag? – Jelle Dijkstra Mar 18 '15 at 13:38
  • 1
    @JelleDijkstra thanks a lot for your answer. When I add parse="inward" to the exp:channel:entries there is no change, the bug is still here. BUT when I replace {exp:transcribe:replace name='written_by'} to {exp:transcribe:replace parse="inward" name='written_by'} it works just fine!! Is there a way to make this change global so I don't have to add this line everywhere? I'll do some research on my own but if you think at something let me know!! THANKS again! I edited the template code in the question to include more code, I should have done that first. – Kev Mar 18 '15 at 14:38
  • You are doing something else what seems a bit tricky too: you are nesting a channel entries tag within a channel:categories tag. I guess that's also causing the problem. It would be best to pass the category_id to an embed where the channel:entries is in – Jelle Dijkstra Mar 18 '15 at 16:02
  • Thanks for your help. You should add an answer about parse="inward" so I can mark it as accepted as it helped a lot. – Kev Mar 18 '15 at 19:23
  • Incidentally, how does EE come up with such "random" strings? I ask because I got the exact same string on a site I'm developing, which tells me it's not exactly random... – Sandwich Sep 28 '15 at 18:10
1

it's to do with parse order. something is mixed up.Can you try addin a parse="inward" to the exp:channel:entries or the exp:transcribe:replace tag?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.