More in this section
Forums / Bugs & Issues / Language breaks custom field

Language breaks custom field

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 1 answered
  1. Johanna
    Johanna avatar
    5 posts
    13 May 2013
    29 Oct 2013
    Link to this post
    i created a custom field in a clean project for selecting multiple images and displaying them in a image gallery (with a javascript, that shoould only be rendered into the site in the frontend, not in the backend).  In my clean project it was working, in my actual website it was not. And broke the content edit view (look at the screenshot).  This was because the javascript of my conditional template (in the ascx) was rendered into the backend. This should not happen because the javascript is defined under the displaymode "read":
    <sf:ConditionalTemplate Left="DisplayMode" Operator="Equal" Right="Read" runat="server">

       I realized that this happens when you have your website support multiple languages. It then renders the field two times. The first time as expected. And the second time in read mode under

    <div id="contentViewEditDialog_ctl00_ctl00_contentView_newsBackendEdit_ctl00_ctl00_translationWrapper" class="sfTranslateFromWrp">

    Which in my case destroys the layout. Can i somehow prevent the second render?

    Aswell i had another small bug, while editing a page. If you got a layout element with 2 columns (for example 50% 50%) and try to set margins, the left margin of the second column will not apply. And the margin is also deleted, after reopening the settings.

    Thx for helping,

  2. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    26 Mar 2015
    01 Nov 2013
    Link to this post
    Hi Johanna,

    Thank you for using our products.

     The script behavior you notice can be dealt with fairly easily. Please direct your attention to this blog post. The example there uses the page's PreRender event in order to determine whether the page is in Design mode and in the backend and does not execute your scripts then. Provided the scripts do not run while in page editor you will not notice the problems you described. Please make sure that you clear your browser cache after you apply the fix so that Sitefinity can load the scripts from the server, not the cache.

    As for the margins - this is a known bug in Sitefinity. it has to do with the fact that Sitefinity layout controls accept their margin values as inline and therefore are very hard to override. I have increased the bug's priority. You can track its progress as well as vote for it in order to increase its priority yourself in our PITS.

    I hope this information helps. We apologize for any inconvenience caused.

    Ivan D. Dimitrov
    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
2 posts, 1 answered