web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Portal - Content Snippet displayed twice

(0) ShareShare
ReportReport
Posted on by 1,549

So we have a bilingual Portal built with Adxstudio version 7.

On the search.aspx page, there is a translation missing, so we tried to insert a content snippet in the code. But when we run the page, the snippet displays twice.

An image is worth a thousand words, so here it is:

Original code:
<h3>No results for query <em class="querytext"><%# AntiXss.HtmlEncode((Eval("[Query]") ?? string.Empty).ToString()) %></em></h3>

Result on the portal:
pastedimage1582031875915v1.png

Modified Code:
<h3><adx:Snippet runat="server" SnippetName="Knowledge Base No Results" DefaultText="No results found for Query "/><em class="querytext"><%# AntiXss.HtmlEncode((Eval("[Query]") ?? string.Empty).ToString()) %></em></h3>

Result on the portal:
pastedimage1582032023471v3.png

For some reason the snippet default text displays twice.

Any idea?

I have the same question (0)
  • - Matt Bayes - Profile Picture
    890 on at

    Hey Yvan,

    Being an older version of the portals I am not too familiar with some of the specifics.

    Based on the output, the only things I can think would be:

    1. The Content Snippet is rendering the DefaultText attribute even though it has information. If possible, maybe remove this from your tag and see if it changes anything.
    2. Due to the nature of your portal having multi-languages setup, it could very well be rendering both the English and French snippets. Take a look at the snippets in your system and see if there are multiple with the same name and value.

    Give that a go and let me know what you find.

    Thanks!

    Matt Bayes

  • yleclerc Profile Picture
    1,549 on at

    Hi Matt,

    Thanks a lot for providing a few solutions.

    1. I tried removing the DefaultText attribute. No luck here. It still displays twice. Then I made sure all Content Snippets were deleted from CRM. Then nothing displays at all. As soon as I added the Snippet again, it shows twice

    2. I removed all related Snippets from both French and English Portals. Still diplays twice. Very weird behaviour.

    So I am still scratching my head with this!

  • - Matt Bayes - Profile Picture
    890 on at

    Hey Yvan,

    Thanks for trying out those options - it's super weird that it's still happening!

    I can only think of two more items for you to try:

    1. Inspect the HTML via your browser that's generated with the duplicate text, just to see what tags it's being wrapped in. This may point us in the right direction or at least allow us to rule out potential issues.
    2. Add the "Editable" property to the Content Snippet tag and specify the "EditType" tag for "html" or "text" depending on what you are rendering. Once complete, you should be able to edit the snippet inline on the page if you have the correct permissions, and maybe this will show you some additional information that might not be easily visible from within the CRM environment. The information for this can be found here.

    Feel free to send me the HTML markup from #1 as it may also help me track down the potential issue.

    Keep me posted on what you find!

    Thanks!

    Matt Bayes

  • yleclerc Profile Picture
    1,549 on at

    Thanks again Matt! This is just getting weirder!

    I added both "Editable" and "EditTpye", so now the code looks like this:

    <asp:Panel Visible='<%# ((int)Eval("Count")) == 0 && ((int)Eval("PageNumber")) == 1 %>' runat="server">

    <h3><adx:Snippet runat="server" SnippetName="Knowledge Base No Results" Editable="true" EditType="html" /><em class="querytext"><%# AntiXss.HtmlEncode((Eval("[Query]") ?? string.Empty).ToString()) %></em></h3>

    </asp:Panel>

    I also logged on the portal with an admin account. It still shows twice. But thee weird part is when I try to edit the snippet inline, it's there only once - see:

    Here is the code from the HTML inspection. We can see the class being generated twice:

    pastedimage1582810945372v1.png

    pastedimage1582810959862v2.png

    When I inspect the HTML, we can see a few things are duplicate... like xrm-attribute...

    h3><div class="xrm-attribute xrm-editable-html xrm-attribute xrm-editable-html" data-encoded="false" data-filebrowser-dialog-url="~/xrm-adx/filebrowser.html" data-filebrowser-url="/_services/portal/66a69c56-546f-4066-b0d8-a14fa99df63b/elFinder/connector" data-cmstemplate-url="/_services/portal/66a69c56-546f-4066-b0d8-a14fa99df63b/adx_contentsnippet/505b1335-ce57-ea11-8159-005056b9257d/__templates/all/L2tub3dsZWRnZS1iYXNlL3NlYXJjaC1yZXN1bHRzLw%3d%3d" data-editable-url="/_services/portal/66a69c56-546f-4066-b0d8-a14fa99df63b/adx_contentsnippet/505b1335-ce57-ea11-8159-005056b9257d/adx_value" data-label="Knowledge Base No Results" data-liquid="true" data-editable-title="Knowledge Base No Results" data-cmstemplate-render-url="/_services/portal/66a69c56-546f-4066-b0d8-a14fa99df63b/adx_contentsnippet/505b1335-ce57-ea11-8159-005056b9257d/__templates/live-preview/L2tub3dsZWRnZS1iYXNlL3NlYXJjaC1yZXN1bHRzLw%3d%3d" data-xrm-base="/xrm-adx/">
    <div class="xrm-attribute-value">No Results for Search:</div><div class="xrm-attribute-value">No Results for Search:</div>
    </div><em class="querytext">ABCDEF</em></h3>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 107 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 94

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans