Viestit paikassa Github
Exception from Tracker afterFlush function: ReferenceError: Ps is not defined
Server Setup Information:
- Did you test in newest Wekan?: yes (current edge is 1.88, the same as stable)
- For new Wekan install, did you configure root-url correctly? yes
- Wekan version: 1.88
- Operating System:
- Deployment Method: snap
- Http frontend: –
- ROOT_URL environment variable: http://localhost
Problem description:
Since (at least) a few days back, my web console (in both Firefox and Chrome) is logging this error whenever I open a card. The same error is also logged for opening a board. Additionally, in the more compact view (when the browser window is small, as in the gif I’m attaching), expanding a list causes the same error, as does closing a card.
This doesn’t seem to affect any functionality AFAICT (although I did notice this while investigating why vertical scrolling within a card is suddenly very slow, but that is probably unrelated and possibly local).
The attached animation is from a fresh install with just the user account and one test card created.
Steps to reproduce:
- Open web console
- Open a card
What happens:
”Exception from Tracker afterFlush function”, ”ReferenceError: Ps is not defined”. Web console log attached.
If using Snap, output from sudo snap logs wekan.wekan
(Nothing during the error event)
After adding the PPA, replace ’cosmic’ with ’bionic’ in the sources list
Alternatively, after adding the PPA, replace ’cosmic’ with ’bionic’ in the sources list, as the package for Bionic currently appears to install and work in Cosmic just fine (from my brief testing).
Use parse_blocks() instead of gutenberg_parse_blocks() in WP >=5
The release of WordPress 5.0 brought up an issue with the use of gutenberg_parse_blocks() in aesop.php: apparently for WP versions with Gutenberg integrated, parse_blocks() should be used instead of gutenberg_parse_blocks(), otherwise a fatal error occurs when Gutenberg tries to redefine WP_Block_Parser_Block.
The issue here, if any, is apparently just one of confusion
You can reproduce this even with Twenty Nineteen, by adding <?php $blocks = gutenberg_parse_blocks( $post->post_content ); ?> to header.php.
Replacing gutenberg_parse_blocks() calls with parse_blocks() seems to work around the issue (for me at least), and the issue here, if any, is apparently just one of confusion: renaming the function broke backwards compatibility, but since gutenberg_parse_blocks() is still defined, instead of a ”Call to undefined function” you get this attempt to redefine WP_Block_Parser (via inclusion of parser.php), resulting in the ”name is already in use”.
Per-user invocation example of occ versions:cleanup is missing users list
”Using the occ command” documents using versions:cleanup either globally or for specific users, with example invocations for both cases. However, said examples are identical in the current revision:
This example deletes all versions for all users:
sudo -u www-data php occ versions:cleanup Delete all versions Delete versions for users on backend Database […]You can delete versions for specific users in a space-delimited list:
sudo -u www-data php occ versions:cleanup Delete versions of freda Delete versions of molly
Unless I’m misinterpreting this, the latter example should have the space-delimited list of users following the invocation, like so:
sudo -u www-data php occ versions:cleanup freda molly
Cover2 also appears to exhibit this in single post view
My test blog is running WP 5.0-beta3-43867 with Gutenberg 4.3.0-alpha-0841246 (from Daniel Bachhuber’s nightly), and the theme I’m using is Cover2 (Github here), which also appears to exhibit this in single post view.
I’ve narrowed it down to this function (called from header.php), where the gutenberg_parse_blocks() call triggers the issue.
I’m not saying I’m 100 % sure it’s Gutenberg and not the theme(s) at fault here, but I just thought I’d post this just in case it helps to find out either way.
Amended to replace whitespaces mixed with tabs in extension.json, and to fix description message id.
Amended to replace whitespaces mixed with tabs in extension.json, and to fix description message id.
Restructure into a MW 1.25+ style extension
Refactor file structure so that the extension can be loaded using MW 1.25+ style wfLoadExtension(), and makes MW 1.25+ a requirement. Otherwise the core functionality should remain just as it was (i.e., if it doesn’t, that’s unintentional on my part).
This closes issue #3.
Support registration with wfLoadExtension()
Since MediaWiki 1.25, the suggested method of registering extensions has been to use wfLoadExtension() instead of a direct require_once. AddBodyClass currently (v1.2.0 from 2016-03-21) still uses the old style, so I’m opening this issue to suggest converting the extension to use the new method.
I’m also preparing a pull request with the minimal changes that I think should accomplish this, and I’ll post it next.

