Jump to content

Recommended Posts

Posted

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!

  • 2 weeks later...
Posted

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>

 

  • Like 3
Posted

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.

Posted

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.

  • Like 1
  • 2 weeks later...
Posted

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.

  • 1 month later...
Posted
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. 

  • 1 year later...
Posted

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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...