Jump to content

PageFrontEdit seems not to work

Guy Verville

Recommended Posts

I have tried to set the PageFrontEdit module and everything seems to apply.  I see in the code that an id pw-edit-1 has been set but really nothing happens. Double-clicking the text does not show me the editing bar. I have checked that the superuser had the right permissions. What am I missing here?


Link to comment
Share on other sites

  • 2 months later...

Hello expert users,

I have not received any thought about my problem here. I have double-checked my settings and everything seems to be operational. However, I don't seen how I can edit in the front-end my text. There is, in fact, no javascript installed in the head to would suggest a editing process while the editing region has been set.

Link to comment
Share on other sites

Can you give a bit more information please:

1. What version of PW is installed?

2. Which option did you use to enable front-end editing: Option A, B, C or D?

3. If using B,C or D please provide the template code you have used to try and enable front-end editing.

4. Any javascript errors in the browser console?

  • Like 2
Link to comment
Share on other sites

Thank you for answering. I have the latest PR 3.0.32, but this prevails since the beginning. I tried Option A and other options. No javascript error. In fact, the javascript doesn't load! I installed a fresh version of PW and it works. Everything is fine in my own site except that the necessary javascript doesn't load...

I have uploaded the files in my templates folder (just the necessary stuff). Perhaps someone will have an idea of what's wrong...


Link to comment
Share on other sites

The PageFrontEdit module renders the necessary markup (JS, etc) immediately before the closing body tag. It uses a simple string replace on the closing body tag to do this, so not much that can go wrong there, provided your template does indeed contain a </body> tag (which yours seems to).

Do you see anything relating to PageFrontEdit in the page source just before the closing body tag?

Of course double-check that you are logged into the back-end as superuser.


Link to comment
Share on other sites

Yes, there is a closing body tag.  As I have said, the necessary markup is in place except the scripts... as if the module cannot recognize the way things are settled in my template. I compare with the template files of the fresh install and I cannot see what is wrong with my installation. I thought perhaps that my jQuery script call (before mine) would prevent the module to operate, but I did remove those scripts and nothing happens. I am flabbergasted....


Link to comment
Share on other sites

This is the code that appends the JS:


All I can suggest is that you debug by editing the module code directly. For example:

1. Log a message to see if function hookPageRender() runs. There are a number of return statements in the function so you can log a number of different messages at different places in the function to check if the function runs right to the end or if some condition is causing it to return early.

2. Dump $out just before it is returned to check that it contains the JS it should (if $out is empty then nothing will be appended).

It will be a process of narrowing down where the problem is occurring.

Link to comment
Share on other sites

Not meaning to hijack for promoting TracyDebugger, but if you grab the very latest version from today, it will let you do




to dump as @Robin S suggested.

Prior to the latest version of Tracy, bd() calls in PW files often didn't work because of the order of when Tracy was loaded.

Hope that helps a little!

  • Like 2
Link to comment
Share on other sites

Thank you so much, everybody. I discovered the culprit which is me... I studied the module and the first this it checks is the presence of the <html> tag... and it was missing! Go figure! After all these years making websites!!!!

I am ashamed... ;-)


Thank you again!

  • Like 5
Link to comment
Share on other sites

  • 1 year later...
On 29/08/2016 at 4:06 AM, Guy Verville said:

I am ashamed... ;-)

Let me join you in that shame! Just spent an infuriating 30mins on this. My template?

<?php namespace ProcessWire; ?>

<?= $page->body; ?>

So glad this thread exists!

  • Like 1
Link to comment
Share on other sites

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.
  • Similar Content

    • By modifiedcontent
      PageFrontEdit would be perfect to use in production, but I see the module is still on version 0.02. Is it actively developed?
      When it works it is perfect, but the edit toolbar doesn't always show up. Chrome seems to work best, but in Firefox and IE/Edge I only get the save and cancel buttons and then when you try to save changes you get an ugly error pop-up 'No changes to save'.
      Has anyone else seen this? Is it a known problem? Maybe a js/jquery conflict? Should I install other editors - if that is possible?
      And is it supposed to work on mobile? Double tap? Or maybe just not on my crappy phone...
      Edit: I have now seen the toolbar show up on IE/Edge, but it is hit or miss. When it doesn't show up and you click cancel and try again, you get the toolbar on the second attempt. Is there a way to make sure the toolbar loads? Move javascript to another place?
    • By Matt_P
      Hi Everyone, 
      I was wondering whether anyone knows what this error is:
      "Error: Class 'ProcessWire\WireData' not found (line 19 of /home/sitehost/public_html/dev/sitename/wire/modules/Page/PageFrontEdit/PageFrontEdit.module)"
      This has been pulled from the logs.
      I found the error after a password reset, though the error did not occur immediately. I only noticed this after reloading the site. This has taken down both the back-end and front-end, I only get a 500 internal server error back.
      Is anyone familiar with this error?
  • Create New...