Hi,

Thanks for the great module.

I experienced an issue using it on my client's site however and would like to share the solution.

After following the installation instructions, the editor disappeared when adding the font size and family option to the toolbar.

I realised that it was because the module is looking for the library in the ROOT folder, rather than in the sites/default/ folder, where my client likes to have their libraries. Fixing the path fixed the problem.

Inspired from the code found in the ckeditor color button module, which looks in both places, I made the correction included in the attached php file (had to zip it because *.php not allowed and couldn't figure the patch out easily this time, but it's a straight drop in replacement).

Hopefully this helps someone else out.

Thanks,

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

telegraph created an issue. See original summary.

telegraph’s picture

Status: Active » Needs review
Silverngold’s picture

/public_html/Libraries/font is where I have it and is not working. Can you show the file where to put it??? Thanks....

telegraph’s picture

Your library path seems to be correct (maybe should be a lower case 'L'?).

The file I uploaded above works the with the 'Libraries API' module, and with these you can instead put your library in:

/sites/default/libraries/font

Silverngold’s picture

Telegraph,thanks,
Your saying to install the Libraries API module and insert code to /sites/default/libraries/font ???

telegraph’s picture

That's how I have it set up (with attached modification in PHP file above).

Anonymous’s picture

does not work for me I am upgrading the status to critical as the module is useless as it does not work at all

Anonymous’s picture

Priority: Normal » Critical
Silverngold’s picture

Weavingmedia, this has been in the back of my mind for months. I've been creating in word, then cut and paste into body. Since this is basic ck editor in core, it is critical. Drupal 7 was a pain to install Ckeditor, but it worked.

jonloh’s picture

FileSize
981 bytes

It seems the dev version has a fix with base_path(), but wasn't included in the attached module here.

The patch here is to combine both the fix from dev and the libraries module detection.

Only issue it's hard to get this committed when the author of this module isn't active ;(

Silverngold’s picture

Jonloh,
Thanks for updating on the module. Could you tell me how to get ckeditor to work in 8.4? Hoping somebody picks up the ckeditor project. Wonder how it and why it works in wordpress? Ditto Joomla, unless It doesn't?

brtamas’s picture

Patch for 8.1.0

Jeanarobase’s picture

A big thank you to Telegraph !!! I spent several days not believing that a module might not work without this patch. Now I know that you have to go to the forum as soon as a difficulty arises. I also learned that to use Drupal 8, you have to learn English (thank you google translation), PHP, HTML, CSS, JAVASCRIPT, among others. So is Drupal still a mainstream CMS? Watch out for the competition .... I stay with Drupal, but it costs a lot of learning time. Fortunately I'm retired.
Regards,

Jeanarobase’s picture

A big thank you to Telegraph and Brtmas !!! I spent several days not believing that a module might not work without this patch. Now I know that you have to go to the forum as soon as a difficulty arises. I also learned that to use Drupal 8, you have to learn English (thank you google translation), PHP, HTML, CSS, JAVASCRIPT, among others. So is Drupal still a mainstream CMS? Watch out for the competition .... I stay with Drupal, but it costs a lot of learning time. Fortunately I'm retired.
Regards,

Jeanarobase’s picture

A big thank you to Telegraph, jonhloh and Brtamas !!! I spent several days not believing that a module might not work without this patch. Now I know that you have to go to the forum as soon as a difficulty arises. I also learned that to use Drupal 8, you have to learn English (thank you google translation), PHP, HTML, CSS, JAVASCRIPT, among others. So is Drupal still a mainstream CMS? Watch out for the competition .... I stay with Drupal, but it costs a lot of learning time. Fortunately I'm retired.
Regards,

Jeanarobase’s picture

Many thanks to Telegraph, Jonloh, Brtamas and all of you !!! I spent several days not believing that a module might not work without this patch. Now I know that you have to go to the forum as soon as a difficulty arises. I also learned that to use Drupal 8, you have to learn English (thank you google translation), PHP, HTML, CSS, JAVASCRIPT, among others. So is Drupal still a mainstream CMS? Watch out for the competition .... I stay with Drupal, but it costs a lot of learning time. Fortunately I'm retired.
Regards,

Silverngold’s picture

Bratamus, thanks for the patch. I just don't know how to install. Still using cut and paste from Word, pain in the butt.

Silverngold’s picture

Jeanarobase, Drupal is very much mainstream. Most powerful CMS on the planet. Just depends if one needs such power. Fun to learn, especially if your retired and are having fun.

Enzman’s picture

Its likely in my view that may be nothing wrong with the module, though the installation instructions are ambiguous and difficult to follow, made complex by different builds / themes etc. In my case I failed to successfully install this module, as I found following the instructions on the Drupal page was incomplete to my satisfaction, and installing the fonts folder in the "libraries folder at root" or in the plugins folder (as on the linked site https://ckeditor.com/cke4/addon/font) became too complex - I don't know which. Maybe the location of the libraries folder at "root" (the location for the folder fonts) is different to my interpretation? I tried creating one at root, /libraries, then under sites/all/libraries (where it would have gone with Drupal 7?) - too many options left unexplained in the installation notes, the readme.txt just repeated what was already on the project page.

I have some skills in user documentation, and am happy to help to make improvements with this module's installation instructions.

Please email me at bruce@enzman.com if interested.

__________________________________

Update: tried installing the font plugin (or is it a library) at /modules/ckeditor_font/src/Plugin and it appears to have broken ckeditor. Reinstalling site from backup.

Silverngold’s picture

Its funny if you think about it. I'm just doing a cut from word and a paste into body on drupal. Waiting to see if one of these versions it will work. So many other exciting things going on with drupal to bail based on this issue.

What's funny is ckeditor works great on my drupal 7 sites.

SuperfluousApostrophe’s picture

I am using the composer project for all of our D8 sites which puts the core files in /web rather than in the document root. The current implementation of the library location in getFile() is careless at best. The patch provided by brtamas in #12 fixes the issue. Please incorporate his patch to the official release ASAP.

alex_optim’s picture

Changed the deprecated method.

rooby’s picture

Webbeh’s picture

Status: Needs review » Closed (duplicate)

Thank you all for the patches and work to help remediate this issue. I'm marking #3051639: Warning: file_get_contents(/libraries/font/plugin.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1130 of core/modules/locale/locale.module). as the One True Issue (tm) for this topic, and referencing this issue as having value for finally getting this issue taken care of.

I've given credit to each person who assisted in this - thank you immensely!