two langauge selectors on page result in invalid xhtml

Posted by Community Admin on 04-Aug-2018 06:49

two langauge selectors on page result in invalid xhtml

All Replies

Posted by Community Admin on 16-Sep-2013 00:00

Add two language selectors and you end up with invalid markup.

www.marktold.com/screencast/sf_two_language_selectors.swf

Greetings from Switzerland

Markus

Posted by Community Admin on 18-Sep-2013 00:00

@Telerik

Any luck in repdroducing this?

Markus

Posted by Community Admin on 23-Sep-2013 00:00

@Telerik

Anybody home and trying to reproduce this?


Markus

---------------------------

While you at it. 

I give my content placeholder and divs short ID to keep the HTML down.  Like t3 and cph_t3  

Is it true that a simple language selector trows out all that HTML, or am I doing something wrong?

languageRepeater_horizontal_langHolder could also read lr_h_lh for example. Not everything has to be worded out.

Could sfLanguageItem also be named sfLangItem

Are the ID's even needed for anything in  li, a, span?

Someone told me he is trying to squize every bit out. And I somewhere read that google likes text over HTML?

<div id="t3">
             
                 
<div id="cph_t3_T9302E8D8019">
                <div id="cph_t3_T9302E8D8019_ctl00_ctl00_controlWrapper">
 
     
 
     
                 
                        <ul id="langsWrapper" class="sflanguagesHorizontalList">
                     
                        <li id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langHolder_0" class="sflanguageItem sflang_en">
                            <a href="../en/applications/energy-engineering" id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langLink_0" class="sflanguageLnk" lang="en"><span id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langName_0">English</span></a>
                        </li>
                     
                        <li id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langHolder_1" class="sflanguageItem sflang_fr">
                            <a href="../fr/secteurs-d'application/energietechnik" id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langLink_1" class="sflanguageLnk" lang="fr"><span id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langName_1">français</span></a>
                        </li>
                     
                        <li id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langHolder_2" class="sflanguageItem sflang_it">
                            <a href="../it/settori-di-applicazione/energietechnik" id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langLink_2" class="sflanguageLnk" lang="it"><span id="cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langName_2">italiano</span></a>
                        </li>
                     
                        </ul>
                     
             
</div>
 
            </div>
             
        </div>

kind of

<div id="t3">
<div>
<div>
<ul id="langsWrapper" class="sflanguagesHorizontalList">
<li class="sflanguageItem sflang_en">
<a href="../en/applications/energy-engineering" class="sflanguageLnk" lang="en"><span>English</span></a>
</li>
<li class="sflanguageItem sflang_fr">
<a href="../fr/secteurs-d'application/energietechnik" class="sflanguageLnk" lang="fr"><span>français</span></a>
</li>
<li class="sflanguageItem sflang_it">
<a href="../it/settori-di-applicazione/energietechnik"  class="sflanguageLnk" lang="it"><span>italiano</span></a>
</li></ul>
</div>
</div>
</div>

Posted by Community Admin on 16-Oct-2013 00:00

@Telerik

Anyone? 

Markus

Posted by Community Admin on 24-Oct-2013 00:00

Hi Markus,

We were not able to reproduce the error on our local machine. I followed the video step by step and did not end up with the exception.Here is a video of what I did. Please inform me if there is something I am not doing correctly.
If not then this leads me to believe that this issue needs to be resolved on your project.

Regards,
Ivan D. Dimitrov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Oct-2013 00:00

Dear Ivan

Did you read the post title and watch my screencast?

What I am missing from your video is checking for valid XHTML: 

www.marktold.com/screencast/sf_two_language_selectors.swf

Markus

Posted by Community Admin on 24-Oct-2013 00:00

You're wasting your time making your Ids small, the "savings" are beyond trivial, especially when you take into account future maintenance on obscure IDs...

Why don't you just set ClientIDMode="Static" on the control and see if it works...usually does (for most things) and you don't get the bloated asp webforms IDs.

Posted by Community Admin on 24-Oct-2013 00:00

Dear Steve

My main concern is the invalid XHTML.

Reducing mark-up was just a side request. And am not trying to make my IDs small. I am trying to make Telerik make my IDs small :-)

And I do still think size matters even more now that we have a lot of smart phone users.

Markus

Posted by Community Admin on 24-Oct-2013 00:00

With compression you will barely save a byte on trimming a couple characters from some IDs...it's such a non issue.  Now removing the WEBFORMS prefixing (cph_t3_T9302E8D8019_ctl00_ctl00_languagesRepeater_horizontal_langHolder_0) saves both a measureable amount, and allows easier javascript selectors to be used.

However they can't use ClientIDMode static by default as someone might have a need to use the widget more than once...which is your issue

So in THIS case, it's solved easily by changing the template from

<ul id="langsWrapper" class="sflanguagesHorizontalList">
 
TO
 
<ul id="langsWrapper" class="sflanguagesHorizontalList" runat="server">
(or just remove the ID altogether

...agree that telerik should do this in the template, but if it's bugging you, map external and set that

Posted by Community Admin on 29-Oct-2013 00:00

@Ivan

How about it - were you finaly able to reproduce the invalid XHTML markup?


Markus

Posted by Community Admin on 29-Oct-2013 00:00

Hi Markus,

 We were able to reproduce the issue. It seems that the ClientID of the language selector does not take the value of inherit even though it is specified in the designer. This results in invalid markup. I have logged this as a bug. You can track the progress as well as vote in order to increase the bug's priority in our PITS. We will do our best to dispose of the issue in our future releases.

Regards,
Ivan D. Dimitrov
Telerik
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 29-Oct-2013 00:00

Dear Ivan

Thanks. I love the: to increase the bug's priority comment :-) But for what it's worth I voted for it.

Markus

Posted by Community Admin on 09-Jan-2014 00:00

Dear Ivan

Sorry to say that two language selectors in 6.3 still produce invalid xhtml code. 

Markus

Posted by Community Admin on 20-Aug-2014 00:00

Dear Ivan

Sorry to say that two language selectors in 7.1 still produce invalid xhtml code, unless I am mistaken :-(

Another bug that is not fixed after one year. Isn't XHMLT compatiblity high on the list?


Markus

Posted by Community Admin on 05-Jan-2015 00:00

2015, Sitefinity 7.2.5310 and this is still happening....

Posted by Community Admin on 08-Jan-2015 00:00

Hello all,

The bug in question has been escalated to our development teams.

Regards,
Ivan D. Dimitrov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed