+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / two langauge selectors on page result in invalid xhtml

two langauge selectors on page result in invalid xhtml

16 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    16 Sep 2013
    Link to this post
    Add two language selectors and you end up with invalid markup.

    www.marktold.com/screencast/sf_two_language_selectors.swf

    Greetings from Switzerland

    Markus
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    18 Sep 2013 in reply to Markus
    Link to this post
    @Telerik

    Any luck in repdroducing this?

    Markus
  3. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    23 Sep 2013 in reply to Markus
    Link to this post
    @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>

  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    16 Oct 2013 in reply to Markus
    Link to this post
    @Telerik

    Anyone? 

    Markus
  5. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    24 Oct 2013
    Link to this post
    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
  6. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    24 Oct 2013 in reply to Ivan D. Dimitrov
    Link to this post
    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
  7. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    24 Oct 2013
    Link to this post
    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.
  8. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    24 Oct 2013 in reply to Steve
    Link to this post
    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
  9. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    24 Oct 2013 in reply to Markus
    Link to this post
    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
  10. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    29 Oct 2013 in reply to Steve
    Link to this post
    @Ivan

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


    Markus
  11. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    29 Oct 2013
    Link to this post
    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
  12. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    29 Oct 2013 in reply to Ivan D. Dimitrov
    Link to this post
    Dear Ivan

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

    Markus
  13. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    09 Jan 2014 in reply to Markus
    Link to this post
    Dear Ivan

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

    Markus
  14. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    20 Aug 2014 in reply to Markus
    Link to this post
    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
  15. Raymond Dowe
    Raymond Dowe avatar
    37 posts
    Registered:
    10 Mar 2010
    05 Jan 2015
    Link to this post
    2015, Sitefinity 7.2.5310 and this is still happening....
  16. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    08 Jan 2015
    Link to this post
    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
     
16 posts, 0 answered