crayon-syntax-highlighter
crayon-syntax-highlighter copied to clipboard
Highlighting does not work in WordPress 4.0.1
With the installation of a new wordpress theme (went from Divi to Enfold) the highlighting stopped working in a strange way.
It works perfectly well in the preview of the page, but when the page is actually published nothing is highlighted at all.
The logs show the following:
[Crayon Syntax Highlighter Log Entry - 10:37:29 AM - 28 Nov 2014] [SYSTEM LOG] 'Updated from 2.6.8 to _2.6.9_beta' [Crayon Syntax Highlighter Log Entry - 10:38:12 AM - 28 Nov 2014] [SYSTEM LOG] 'Upload directory is empty: cannot load languages.' [SYSTEM LOG] 'The resource directory is missing, should be at ''.' [CrayonUtil::lines()] 'Cannot read lines at 'default/default.txt'.' [Crayon Syntax Highlighter Log Entry - 10:38:18 AM - 28 Nov 2014] [SYSTEM LOG] 'Upload directory is empty: cannot load languages.' [SYSTEM LOG] 'The resource directory is missing, should be at ''.' [CrayonUtil::lines()] 'Cannot read lines at 'default/default.txt'.'
How can I solve this issue?
I am using all the default crayon settings and using the javascript language. I have tried to disable all other plugins and tried reinstalling the plugin through wordpress, this did not help. Tried both the latest version downloaded through wordpress and the beta version.
I'm having the same issue and would love to figure this out.
This is related to https://github.com/aramk/crayon-syntax-highlighter/issues/172 and https://github.com/aramk/crayon-syntax-highlighter/issues/166. We weren't able to fully determine the cause of the issues, but subsequent version updates fixed the issue for those users.
I'm getting a similar issue on both a site running 4.0.1 and 4.1.1, although the highlighting doesn't work on either preview or in publication (see below).
It appears as if the code elements are getting classes appended to them correctly:
However, the highlighting itself doesn't happen. Is it possible some CSS rules aren't being included for some reason? If the individual span classes are supposed to have CSS rendered, they aren't - see the screenshot below:
I was getting an issue with Go loading ([CrayonUtil::lines()] 'Cannot read lines at '/langs/go/statement.txt'.') and fixed it by renaming go.txt to statement.txt, but this appears to have no bearing on the rendering problem.
Hi, I have a similiar issue. I'm using the Enfold Theme and the highlighting only works with ?preview=true
.
Does someone know what the difference is when setting the preview flag in the URL?
I'm getting this error in the log:
[Crayon Syntax Highlighter Log Entry - 10:55:56 AM - 01 Dec 2016]
[SYSTEM LOG] 'Upload directory is empty: cannot load languages.'
[SYSTEM LOG] 'The resource directory is missing, should be at \'\'.'
[CrayonUtil::lines()] 'Cannot read lines at \'default/default.txt\'.'
The php script already fails to prepare the HTML output.
Crayon Version 2.8.4 WordPress 4.6.1 Enfold Theme Version: 3.8