October 13, 2017, at 11:35 AM (14 comments)
Update for PmWiki activity September 27, 2017 - October 13, 2017: 2 new releases, documentation, internationalization, 7 recipes updated, discussions about protecting usernames, calling core functions from config files, cookbook bug reports and patches.
This version is a major upgrade on the internal processing of markups and patterns, all core scripts were updated to be compatible with PHP version 7.2. Whether you use that PHP version or another one, with any local configurations and custom add-ons, there should be no change for what you see, but if any problems please contact us immediately.
Pagelists can now have optimized list=grouphomes
and fmt=#grouphomes
arguments to list only the home pages of your wiki groups, whether they are named Group.HomePage, Group.Group, or a custom Group.$DefaultName
. Minor bugs in older xlpage scripts were fixed, the responsive skin is now compatible with even older PmWiki/PHP versions, web subtitles (*.vtt) were added as an allowed extension, input form fields can now have a "title" attribute (usually rendered as a tooltip/help balloon when the mouse cursor is over the input element), and a configuration variable $AuthLDAPReferrals
was added for wikis running AuthUser over LDAP to force enable or disable referrals when needed.
The documentation was updated.
PmWiki entries at Wikipedia ([1], [2], [3]) and WikiMatrix ([4]) were updated.
PmWiki uses a few markup rules like additional punctuation to signify when a text needs to become a link, a heading, bold, colored or some other meaning. If you need to escape some text that should not be considered as markup but rendered as-is, you can wrap it in [=...=]
or [@...@]
brackets (the latter renders the text in monospace/fixed width font):
* This is '''bold'''. * This is not [='''bold'''=] * This is not [@'''bold'''@] |
|
If you wish to insert a comment in a page, like a reminder to editors, you can use the (:comment ...:)
directive, eg (:comment Remember to update the Date:)
. This comment will not be printed in the HTML output of the page.
Another way to have a block of text in the page source that will not appear in the HTML output is to use a conditional markup:
(:if false:) This will not be printed in the page. (:ifend:)
You may want to hide a block of text from most visitors but to show it to editors or administrators, in that case use (:if auth edit:)
or (:if auth admin:)
.
Finally, there is a WikiStyle >>comment<<...>><<
or %comment%...%%
that will process and output the text in the HTML page, the text will be hidden for most visitors, but clearly readable if the visitor disables styles, uses a screen reader device, views the HTML source of the page, or is a bot, like a search engine bot or a spam bot.
You should never hide secrets in wikistyles (very easy to circumvent) or in conditional markup (anyone who can edit even a single page on your wiki may be able to read conditionally protected blocks in other pages; if the source
action is not explicitly protected, even non-editors can view the wiki source text). To hide secrets, place them in separate pages and set passwords on these pages.
The documentation updated:
(:input select:)
which arguments apply to the outer <select> tag and which to the inner <option> tags.
The German documentation was updated. You can download it here.
On the mailing list:
In the PITS: PmWiki Issue Tracking System (please comment, vote):
$DefaultPasswords
in config.php) A long discussion with examples with the (least bad) way to call core functions like CondAuth() or PageVar() from (farm)config.php.
?action=worserecache
.
Discussions:
(total: 2 pages)
14 comments on "PmWeekly, October 13, 2017"
The host displays the following message whenever I set PHP to version > 5.4:
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :markup(\s+([^ ]*?))?:\)[^\S ]*\[([ =@ ])(.*?)\3\]/sei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Please see Troubleshooting about how to track the add-on that needs upgrade. Also, double check that you have updated all files in the "scripts" directory, as well as pmwiki.php. It is not recommended to rename pmwiki.php to index.php as you may forget to update it and may run obsolete or even vulnerable code.
I find it strange that line 1758 of pmwiki.php in version 2.2.104 still contains preg_replace() in contradiction with explanations on the Troubelshooting page. This is the error that the server is pointing at when running PHP > 5.4.
I did the diagnostic as indicated on Troubleshooting, loading the home page with "action=ruleset". The bits indicating errors all target files contained in "cookbook", for instance:
file: /home/letivbvp/www/wiki/cookbook/sectionedit.php, line: 359, pat: /\( :sectionedit\s+(\S.*?)\s+(\S.*?)\s+(\d.*?)
Indeed, these are old files. The problem is that the "cookbook" folder is empty in the 2.2.104 installation... Where can I get the proper files?
You wrote a message from "action=ruleset" that comes from the sectionedit.php script which is likely part of that recipe, so it is likely included by your wiki configuration. If you want to upgrade it, in the SectionEdit page there is a first section "Solution" with a list of lines each starting with "Download...". If you prefer to disable the recipe, you don't need to download and install the new files, simply disable the "include_once" calls in config.php (remove or comment out by inserting # at the beginning of the lines).
I removed all include_once calls in config.php so that "action=ruleset" no longer indicates any incompatible file.
However it does not yet work. Running PHP 7.1, I still get the same error message:
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/<(\/?(table|tr|th|td|img|script|span|iframe|b|i|em|u|sup|sub|a|iframe|small|object|param|embed|div|br|blink)(?![a-z!])((['"]).*?\4|.*?)*?)>/ie preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
The code of pmwiki.php in which this error occurs is :
if ($p{0} == '/') {
if (is_callable($r)) $x = preg_replace_callback($p,$r,$x);
else $x=preg_replace($p,$r,$x);
}
I guess that it might work if is_callable() returns TRUE...
Finally I removed every include_once() and Markup() in config.php but I am still getting the following set of errors:
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :noleft:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :noright:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :noaction:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :notabs:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :nosearch:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :notitle:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /home/letivbvp/www/wiki/pmwiki.php on line 1758
ERROR: pat=/\( :notitlegroup:\)/ei preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
These particular messages come likely from the skin - in config.php you'll find the
$Skin
variable, then you can get a more recent version, PHP 5.5 compatible, from the Skins group, or another skin.This comment form is part of B3 blog, but there are other addons in Category.Comments.