PreviewChanges-Talk

Summary: Talk page for PreviewChanges.
Maintainer: Petko
Users: +8 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Fatal error returned when trying this out for first time.

May conflict with existing pagerevinline recipe>

Installed the recipe and edited config file, but received a fatal error on first previewing an edited page, as follows:

 Fatal error: Cannot redeclare linksuppress() (previously declared in 
 /home/secret/public_html/pmwiki/cookbook/pagerevinline/pagerevinline.php:15) 
 in /home/secret/public_html/pmwiki/scripts/pagerev.php on line 13

Disabled new recipe and things returned to normal.

Des September 12, 2012, at 04:50 AM

I suppose the recipe "pagerevinline.php" (InlineDiff) is not compatible with PreviewChanges. --Petko September 12, 2012, at 04:55 AM

Is this a problem with the most recent version of InlineDiff? --Petko September 17, 2012, at 09:35 AM

Good catch - I had forgotten about the earlier version of InlineDiff being in use here. I have an earlier version in use after I found the styling was lost and the history spread across the full screen width with the latest one. I reverted to the earlier version and never followed up as it was working fine. I never thought as it is my habit to update unless there is a reason not to.

When I installed the most recent InlineDiff the conflict I reported appeared to go away - but the loss of styling returned.

Thank you for investigating and reporting on the version compatibility (I suppose I will have to go and look for the cause of the loss of styling when I change to the most recent InlineDiff. Oh well.)

Des September 17, 2012, at 12:29 PM

If you can't upgrade, you can just rename the function 'LinkSuppress' in pagerevinline.php to something else, like 'LinkSuppressInlineDiff' and then change the variables $LinkFunctions['http:'] and $LinkFunctions['https:'] near line 75, to contain the new name. BTW, since version 2.2.12, pmwiki has a simpler word-diff function included in the core, in case you decide to try/compare. --Petko September 17, 2012, at 01:17 PM

Mind-reader! I just hashed out the InlineDiff configs to see if the 2.2.12 core function kicked in, and things look much the same to me at first glance (and with expected correct styling in place!), so the recipe seems superfluous now so will be going, and I can have PreviewChanges. Forgive an extra question, but is it possible to have differences highlighted in output view as well as markup? I don't think I spotted this in the cookbook area. Des September 18, 2012, at 03:38 AM

Sorry, highlighted diffs of the HTML output are not possible at the moment, and I believe the InlineDiff recipe doesn't support them either. Such a feature would be much more complex to implement correctly and nobody has done it yet. --Petko September 18, 2012, at 04:05 AM

Ok, I understand, and once again, my thanks - I was about to hunt through the cookbook in case I missed something, so you saved me from that. Des September 18, 2012, at 03:58 PM

Talk page for the PreviewChanges recipe (users).