fuellink issues

edited March 2015 in Bug Reports
Hi

I've encountered a couple of problems with the fuellink CKEditor plugin.

1. In the development branch, if I double-click an existing link in the RTE, nothing happens. The console log reports
"Error: TypeError: myMarkItUpSettings.parserLeftDelimiter is not a function"


2. Using Fuel 1.2, if I enter and save a URL which contains "&" and then double-click to open the dialog again, the URL is truncated at the first "&". Such URLs are converted to "&" in the RTE.

eg: http://randd.defra.gov.uk/Default.aspx?Menu=Menu&Module=More&Location=None&Completed=0&ProjectID=16368

I wanted to see if #2 was fixed in the developer branch but #1 prevents me.

Cheers

Comments

  • >> Such URLs are converted to "&" in the RTE.

    That should be the entity notation "& amp ;" - the forum s/w seems to have converted it?
  • edited 1:40AM
    1. If you do a search for the function "parserLeftDelimiter" does it appear in the jquery.markitup.set.js file? There have been some CKEditor specific fixes in the development branch.

    2. I believe this is something that CKEditor is doing automatically with the content and not sure if there is a quick fix for the encoding of the ampersands.
  • 1. Yes, I have that function in that file. Oddly, that file is not being loaded. A full text search on that filename on the whole development branch I downloaded doesn't reference it anywhere?

    2. Yes, I agree. Their docs show an option to make CKEditor preserve ampersands but I couldn't get it to work - I think it needs an extra plugin. I don't mind whether ampersands are preserved or converted to entities, I'd just rather fuellink didn't truncate the URL when you call the dialog to edit the link.

    Hopefully your recent CKEditor changes will sort this for me when I get it to work...
  • edited 1:40AM
    That file should be getting included in the fuel/modules/fuel/custom_fields.php file for the 'wysiwyg' field type. If you look at your browser's developer console, when you load the page, does it show the jquery.markitup.set.js file load?
  • My jqx was out of sync too. I'm now testing on a full git pull of the develop branch. Double-clicking a link now brings up the dialog correctly.

    Unfortunately, the latest fuellink changes have not fixed the original problem - where URLs containing ampersands as part of a query string are truncated in the dialog when opened to edit. New URLs are saved correctly in the CKEditor, it's when the fuellink dialog tries to edit that is a problem...

    The same thing happens when the markitup editor is used too.

    It seems that in ./fuellink/plugin.js, the full url is parsed correctly at line 35 (input = the full url string) but on line 52, calling myMarkItUpSettings.displayLinkEditWindow() displays it truncated.

    On further inspection of jquery.markitup.set.js, it seems the call to ./fuel/pages/select in the on line 464 is the culprit in ./fuel/controllers/page.php (select() function).
  • edited 1:40AM
    I think I see the issue. I've posted a fix for that issue.
  • Great. Thanks.
  • Yes, that seems to work for the fuellink plugin. Excellent. Many thanks.

    However... :( There seems to be a similar issue with editing images using fuelimage.

    If you double-click a previously inserted image, nothing happens and the js console reports:

    ReferenceError: RexExp is not defined.

    It looks like a typo on line 40. "RexExp" should be "RegExp"
  • edited 1:40AM
    Thanks for the report, that fix has been posted to the dev branch of the repo.
Sign In or Register to comment.