Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Adds the script tag in seemingly random places.

#10

the include_tinymce_if_needed method seems to be sticking in the "script" tag wherever it feels like:

<div id="conten&lt;script type=" text="" javascript"="" src="http://thebirn.com/javascripts/tiny_mce/themes/advanced/langs/en.js?1259377024">t"&gt;

A refresh usually fixes it, but this happens on probably one out of every 4 page loads, and it's always in a different place.

Reported by bricker · November 29th, 2009 @ 08:06 PM

State: resolved
Milestone: none
Assigned to: Kieran P Kieran P

Activity

  1. bricker
    bricker

    Sorry, code didn't work:

    <div id="conten&lt;script type=" text="" javascript"="" src="http://thebirn.com/javascripts/tiny_mce/themes/advanced/langs/en.js?1259377024">t"&gt;
    

    November 29th, 2009 @ 08:08 PM

  2. Kieran P
    Kieran P

    Hey bricker,

    I haven't been able to reproduce the issue you're getting. Would you be able to put a small rails app together (don't bundle tiny_mce or rails though), which demonstrates this issue for me to be able to debug.

    Regards
    Kieran

    November 30th, 2009 @ 10:29 AM

  3. Ryan Lundie
    Ryan Lundie

    Hi Kieran,

    I am actually having the same issue. It is happening in any webkit based browser, and it is completely random. When it does it and I refresh it usually just goes back to normal without any problems.

    Is there anything on my end that can be done to provide you with more information?

    Thanks

    Ryan Lundie

    January 19th, 2010 @ 06:36 AM

  4. Kieran P
    Kieran P

    Hey Ryan,

    Thanks for reporting. I've heard of similar issues from others, but still unable to produce the issue.

    I've switched to a webkit browser full time now (Google Chrome) so if I run into the issue, I'll let you know.

    Meanwhile, if you see the issue again, if you could save the page it happens on, and upload/pastie it somewhere, along with which configurations you're using, it might help track down the issue.

    Regards
    Kieran

    January 28th, 2010 @ 12:30 PM

  5. Mr Munchkin
    Mr Munchkin

    Hi Kieran,

    Im having this problem with one of our apps, its our first outing into the world of ruby also - the bug appears in all browsers (ie, safari, chrome, mozilla, opera - on both mac and win) that we have installed on our systems.

    Controler:

      layout :set_layout
      
      uses_tiny_mce(:options => {:theme => 'advanced', :theme_advanced_toolbar_location => "top",  :theme_advanced_toolbar_align => "left",
        :theme_advanced_buttons1 => %w{bold italic underline bullist numlist},
        :theme_advanced_buttons2 => [],  :theme_advanced_buttons3 => []},
        :only => [:index, :new, :create, :edit, :update, :preview, :contact_us])
    

    View:

    <%= load_stylesheet %>
    <%= javascript_include_tag :defaults %>
    <%= include_tiny_mce_if_needed %>
                            
    </head>
    <body class="content" id="minisite">
    <div id="horizon"><div id="wrapper">
                <a id="top" class="target"></a>
                <div id="ms-header">
                            <div class="container">
                                        <h1 class="logo"><%= link_to @dealer.user_company_name, minisite_home_page_url(@dealer.id) %></h1>
                                        <div id="dealer-info">
                                                    <p><strong><%= @dealer.user_company_name %></strong>  us on: <%= @dealer_company_details.phone rescue "N/A" %></p>
                                        </div>
                            </div>
                </div>
    </div></div>
    

    Output Should Be:

    <link href="/stylesheets/minisite/dealer_styles/style_17.css?1269880214" media="screen" rel="stylesheet" type="text/css" />
    <!--[if lte IE 7]><link href="/stylesheets/minisite/ie7.css?1268895758" media="all" rel="stylesheet" type="text/css" /><![endif]-->
    
            
    <script src="/javascripts/prototype.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/effects.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/dragdrop.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/controls.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/application.js?1268895758" type="text/javascript"></script>
            
            
    </head>
    <body class="content" id="tt-minisite">
    <div id="horizon"><div id="wrapper">
    <a id="top" class="target"></a>
        <div id="ms-header">
            <div class="container">
                <h1 class="logo"><a href="http://mysite.co.uk/17">######</a></h1>
                <div id="dealer-info">
                <p><strong>######</strong>
                    Call us on: ######</p>
                </div>
            </div>
        </div>
    </div></div>
    

    But every 4 or 5 refreshes we get something like...

    
    <link href="/stylesheets/minisite/dealer_styles/style_17.css?1269880214" media="screen" rel="stylesheet" type="text/css" />
    <!--[if lte IE 7]><link href="/stylesheets/minisite/ie7.css?1268895758" media="all" rel="stylesheet" type="text/css" /><![endif]-->
    
            
    <script src="/javascripts/prototype.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/effects.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/dragdrop.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/controls.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/application.js?1268895758" type="text/javascript"></script>
            
            
    </head>
    <body class="content" id="tt-minisite">
    <div id="horizon"><div id="wrapper">
    <a id="top" class="target"></a>
        <div id="ms-head<script type="" type="" text="" javascript="" src="http://www.tractortrader.co.uk/javascripts/tiny_mce/themes/advanced/langs/en.js126889578">er">
            <div class="container">
                <h1 class="logo"><a href="http://mysite.co.uk/17">######</a></h1>
                <div id="dealer-info">
                <p><strong>######</strong>
                    Call us on: ######</p>
                </div>
            </div>
        </div>
    </div></div>
    

    Or Even...

    <link href="/stylesheets/minisite/dealer_styles/style_17.css?1269880214" media="screen" rel="stylesheet" type="text/css" />
    <!--[if lte IE 7]><link href="/stylesheets/minisite/ie7.css?1268895758" media="all" rel="stylesheet" type="text/css" /><![endif]-->
    
            
    <script src="/javascripts/prototype.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/effects.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/dragdrop.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/controls.js?1268895758" type="text/javascript"></script>
    <script src="/javascripts/application.js?1268895758" type="text/javascript"></script>
            
            
    </head>
    <body class="content" id="tt-minisite">
    <div id="horizon"><div id="wrapper">
    <a id="top" class="target"></a>
        <div id="ms-header">
            <div <script type="" type="" text="" javascript="" src="http://www.tractortrader.co.uk/javascripts/tiny_mce/themes/advanced/langs/en.js126889578">
     class="container">
                <h1 class="logo"><a href="http://mysite.co.uk/17">######</a></h1>
                <div id="dealer-info">
                <p><strong>######</strong>
                    Call us on: ######</p>
                </div>
            </div>
        </div>
    </div></div>
    

    The Problem Line:

    <script type="" type="" text="" javascript="" src="http://www.tractortrader.co.uk/javascripts/tiny_mce/themes/advanced/langs/en.js126889578">
    

    As you can see the script line seems to randomly skip into the hardcoded areas of the html and we don’t understand why. I hope that this explanation helps you reslove this problem for us and others...

    Regards

    Gary

    March 31st, 2010 @ 02:21 AM

  6. Kieran P
    Kieran P
    • Tag set to upstream bug, editor, tinymce, tiny_mce

    Hey everyone,

    I switched to Chrome not too long ago, and am getting the same issues as you are. After doing some digging, I found the cause is that TinyMCE (the editor, not this tiny_mce gem) is dynamically trying to insert tags into the header of the page. Something is going wrong.

    I'm not a developer of the TinyMCE editor, so I've filled a bug report which you can all follow at:

    https://sourceforge.net/tracker/?func=detail&amp;aid=3010223&amp;gr...

    Given the randomness of the issue on my end, the data I've provided them might be quite hard to use for them to track down, so if you have an example that causes this issue every page load, please post it at the ticket link I posted above. Hopefully this issue will be resolved by them soon.

    Regards
    Kieran

    June 2nd, 2010 @ 03:43 PM

  7. Kieran P
    Kieran P
    • State changed from open to resolved

    Hey everyone,

    One of the developers of the TinyMCE editor said that some bugs with Chrome have been fixed and to upgrade the editor bundled in this gem, so I've done that, and not seen this issue since doing so.

    Please 'gem install tiny_mce'. I'm going to mark this as resolved, but please post back here if you're still getting the issue.

    Regards
    Kieran

    June 3rd, 2010 @ 03:34 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.