1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed XF 1.5.5 Firefox Paste Bug

Discussion in 'Resolved Bug Reports' started by markku, Jan 13, 2016.

  1. markku

    markku Well-Known Member

    After upgrading to XF 1.5.5, Firefox (43.0.4) on Mac seems to be behaving oddly at random times when pasting content.

    Just a few moments ago I tried pasting copied text into between chunks of text, and the pasted text completely disappeared from the WYSIWYG editor, but was viewable and available in the BB Code Editor.
     
  2. StarArmy

    StarArmy Active Member

    It seems like since the last forum upgrade to 1.5.5, I can't paste images into a thread and sometimes when I paste text it's hidden until I go into the bbcode view and back. It sounds like the same problem as the above user. I am also using Firefox 43.0.4 (the newest version) but I am on Windows 7 and/or Windows 10.

    Edit: One of my forum users also says it's also happening on Chrome.
     
    Last edited: Jan 13, 2016
  3. Chris D

    Chris D XenForo Developer Staff Member

    We did make some minor changes to pasting in the editor in XF 1.5.5 but they should only target the Edge browser.

    Is there any particular behaviour, text or image that reprocuces this reliably, or more often?

    Currently can't reproduce on Firefox 43.0.4 on either Windows or Mac OS X.
     
  4. StarArmy

    StarArmy Active Member

    When I paste the image into the thread, it shows up in my point of view, but when I actually post it, the image does not appear in the reply.

    On my forum, the image paste bug works on the Default XenForo style so it's not likely to be a style issue.
     
  5. oza2012

    oza2012 Member

    I confirm it !

    See:

     
    StarArmy, Fuhrmann and thedude like this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Can you guys reproduce the problem here?
     
  7. markku

    markku Well-Known Member

    I can't reproduce here. But I can for 100% certainty say it never happened before XF 1.5.5.

    Could it be a clash with some add-on, only starting after upgrading to XF 1.5.5?

    I guess I have no choice but to disable all add-ons and try again... It's a monumental job to enable them one by one and try to find the culprit, but it is what it is...
     
  8. worrorfight

    worrorfight Member

    Works fine in latest version of Google Chrome running XF 1.5.5

    Running Windows 10 x64

    Edit: Works fine on latest version of Firefox too.
     
  9. Aivaras

    Aivaras Active Member

    I can confirm there is a problem when pasting text in the rich text editor. I noticed it in Firefox after 1.5.5 update. I cannot reproduce it here though. But I can reproduce it with 100% consistency on both my public and test forums (in the latter case with all the add-ons disabled and the default style on).

    1. If I type a text in the rich text editor and paste it using Ctrl+V I get a blank.

    2. If I use Ctrl+Shift+V the text is pasted.

    3. If I do step 1 and switch to the BB code editor I can see the pasted text there. If I then return to the rich text editor the pasted text becomes visible there, too.

    4. If I paste a text from an external text editor all seems to be fine.
     
  10. Chris D

    Chris D XenForo Developer Staff Member

    To clarify, how have you disabled all add-ons? Did you do it one by one in the Admin CP or some other way?

    To everyone else who can reproduce this, please follow the following instructions:

    1. Enable debug mode by adding the following to config.php:
    PHP:
    $config['debug'] = true;
    2. Go to Options > Debug Options
    3. Set the "Use Uncompressed JavaScript" option to "Use uncompressed files from js/xenforo/full/" and Save
    4. Reproduce the issue
    5. Check inside your browser's console (F12 Developer Tools > Console), are there any errors or other info?
    6. Change the option set in 3. back to "Use compressed files from js/xenforo/"
    7. Remove the line added to config.php in step 1.

    Any more info appreciated!
     
  11. erich37

    erich37 Well-Known Member

    happened to me as well.

    - when I paste the text into the "Editor", then the pasted text is not visible.
    - when I click the "save"-button (e.g. in Private Conversation), then the pasted text suddenly appears in the message.

    Firefox (43.0.4)
     
  12. Aivaras

    Aivaras Active Member

    By disabling (unchecking) them in ACP > Home > Add-ons. I didn't go one-by-one. I disabled them all at once.
     
  13. Aivaras

    Aivaras Active Member

    I get "TypeError: match is null."

    The browser points to: ..."js/redactor/redactor.full.js?_v=3c638f56".

    and

    Code:
    if (this.browser('msie') || this.isMobile(true) || match[1] == 'edge')
     
    Last edited: Jan 14, 2016
  14. Chris D

    Chris D XenForo Developer Staff Member

    I had a suspicion this would be the code responsible, be that it's the only code that changed. Just annoying it wasn't immediately reproducible.

    Thanks all.

    The fix is fairly simple. Revert any changes you made as a result of my previous post.

    Then open js/redactor/redactor.js and find:
    Code:
    exec(c)
    (It should only occur once)

    And replace with:
    Code:
    exec(c)||[]
     
  15. markku

    markku Well-Known Member

    This seems to have fixed it for me. Thank you.
     
  16. Mike

    Mike XenForo Developer Staff Member

    This has been fixed now and as of this post, the 1.5.5 package has been updated to indicate this. The download will now be referred to as 1.5.5a to indicate it includes this patch.

    If you are already running 1.5.5, to fix this you may overwrite these two files from the 1.5.5a zip:
    • js/redactor/redactor.full.js
    • js/redactor/redactor.js
    Alternatively, to fix it manually, in js/redactor/redactor.full.js, find:
    Code:
    match = /(edge)[ \/]([\w.]+)/.exec(ua);
    And replace it with:
    Code:
    match = /(edge)[ \/]([\w.]+)/.exec(ua) || [];
    In js/redactor/redactor.js, find:
    Code:
    exec(c)
    And replace it with:
    Code:
    exec(c)||[]
     
    hollosch, Cthulhux, StarArmy and 7 others like this.
  17. whynot

    whynot Well-Known Member

    That was quick.
    Thanks!
     
    Fuhrmann likes this.
  18. Aivaras

    Aivaras Active Member

    NB: to see the changes don't forget to reload the page!
     
  19. Mike

    Mike XenForo Developer Staff Member

    You may need to hard refresh if your browser is caching the file.
     
  20. maszd

    maszd Active Member

    uploading that two files and check at file health check :
    Capture.PNG
    its normal?
     

Share This Page