manlio Posted February 4, 2017 Share Posted February 4, 2017 Hi! I have a problem using front-end editing PW capabilities. I'm using the latest legacy version and I have enabled it, but when I'm in frontend (logged as admin) I get this error in Chrome console Uncaught ReferenceError: ProcessWire is not defined at ckeLoadPlugins (InputfieldCKEditor.js?v=157-1475222106:17) at InputfieldCKEditor.js?v=157-1475222106:22 I tried to disable some modules but it still doesn't work. Anyone have a suggestion how to fix this problem? Thank you! Link to comment Share on other sites More sharing options...
adrian Posted February 17, 2017 Share Posted February 17, 2017 I know this is a little late and it shouldn't happen when using the built-in front-end editing, but when I use frontend forms that need some core js, like AsmSelect fields, since PW 3, I now need to do this to define "ProcessWire" in js. <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; </script> 3 Link to comment Share on other sites More sharing options...
manlio Posted February 18, 2017 Author Share Posted February 18, 2017 Thank you adrian, your reply is still helpful because I started working on other things and I didn't find time to investigate more on this (it is not mandatory). I have added the script in the header and now the error message has changed in Uncaught TypeError: Cannot read property 'plugins' of undefined at ckeLoadPlugins (InputfieldCKEditor.js?v=157-1475222106:17) at InputfieldCKEditor.js?v=157-1475222106:22 ckeLoadPlugins @ InputfieldCKEditor.js?v=157-1475222106:17 (anonymous) @ InputfieldCKEditor.js?v=157-1475222106:22 Thank you as usual for your amazing support. As soon as I can work on this I will try to remove some javascript to see if something change. Link to comment Share on other sites More sharing options...
adrian Posted February 18, 2017 Share Posted February 18, 2017 Have you tried replacing your entire wire folder? Also, what version are you running - I assume 3.x, but perhaps try upgrading to the latest to see if that helps. 1 Link to comment Share on other sites More sharing options...
manlio Posted February 27, 2017 Author Share Posted February 27, 2017 Just as reminder for others. In my case inline editing in PW 2.8.35 don't work, updating to PW 3 fix the issue (although I prefer remaining on 2.8). Thanks adrian for your always present support. Link to comment Share on other sites More sharing options...
gebeer Posted April 8, 2017 Share Posted April 8, 2017 On 2/18/2017 at 5:04 AM, adrian said: I know this is a little late and it shouldn't happen when using the built-in front-end editing, but when I use frontend forms that need some core js, like AsmSelect fields, since PW 3, I now need to do this to define "ProcessWire" in js. <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; </script> Thank you for this very valuable piece of information. After implementing this in the head I still got a JS error: ReferenceError: config is not defined. I had to adjust the code like this to make it work: <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; var config = ProcessWire.config; </script> No idea why my frontend form didn't pick up config from the ProcessWire object. Link to comment Share on other sites More sharing options...
Orodreth Posted September 30, 2018 Share Posted September 30, 2018 I am using LoginRegister module (with PW3.x) and wanted to get CKEditor working for the user profile page bio. The modification from gebeer SOLVED it. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now