Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-02-11 08:28:41

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

wet_textfilter_markdown plugin and PHP 8.0

(I did not find a dedicated thread or other place to report issues with this plugin)

On the admin side, all panels, error report:

A problem occurred while loading the plugin: wet_textfilter_markdown (0.7) -> Warning: Trying to access array offset on value of type null on line 14

textpattern/plugins/wet_textfilter_markdown/wet_textfilter_markdown.php:39 Wet\Textfilter\Markdown->__construct()
textpattern/lib/txplib_misc.php:1435 include()
textpattern/index.php:210 load_plugins()

Not sure if the plugin actually works as expected as I don’t use it personally. But I will test when I get a chance.

TXP 4.9-dev


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2021-02-11 09:37:33

etc
Developer
Registered: 2010-11-11
Posts: 5,157
Website GitHub

Re: wet_textfilter_markdown plugin and PHP 8.0

It seems to work as expected, but I’m a bit perplex re its and some other .zip bundles on plugins site. For example this one is not installable via txp plugins pane, you need to use Composer. This contradicts Installation instructions.

Offline

#3 2021-02-11 11:41:25

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,436
Website GitHub

Re: wet_textfilter_markdown plugin and PHP 8.0

rah_* plugins tend to need composer. We probably should compile those up and offer them as standard installations or (at least) supported .zips.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2021-02-11 12:25:07

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

Bloke wrote #328744:

rah_* plugins tend to need composer. We probably should compile those up and offer them as standard installations or (at least) supported .zips.

A brief reminder that I put up some how-to instructions for compiling Jukka’s plugins :-)


TXP Builders – finely-crafted code, design and txp

Offline

#5 2021-02-11 12:33:01

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

Bloke wrote #328744:

We probably should compile those up and offer them as standard installations or (at least) supported .zips.

That would nice and really helpful. I am sure I am not the only one who sees “need Composer” and moves on to look for another solution.

etc wrote #328739:

It seems to work as expected, […]

Thanks for noting that. The site where this plugin is used is happily running PHP 7.4.x ans will do so for a while I think, thus I am not overly worried yet.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2022-04-17 19:54:47

agovella
Member
From: Houston, TX
Registered: 2005-05-01
Posts: 66
Website Twitter

Re: wet_textfilter_markdown plugin and PHP 8.0

I installed wet_textfilter_markdown by pasting the txt file into the composer, and then I made it active.

But nothing changed. Markdown is not an option in either:
- Admin / Preferences / Publish / Default text formatting
- Content / Write / Format

Earlier, I tried uploading the zip from the plugins site, but absolutely nothing happened.

Any thoughts?

Offline

#7 2022-04-18 17:25:01

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

Hi Austin, can you provide any more information about the Textpattern / PHP versions you have?

I just tested this version from GitHub on a blank installation of Textpattern 4.8.8 and PHP 8.1 and it installed correctly and does show me “Markdown Extra” as an additional option under both the Preferences Admin › Publish › Default text formatting and the article write/edit panel as a Format option next to Body and Excerpt. From brief testing it does process Markdown too.

It shows an error as Philippe noted above but that is resolvable:

phiw13 wrote #328738:

On the admin side, all panels, error report: A problem occurred while loading the plugin: wet_textfilter_markdown (0.7) -> Warning: Trying to access array offset on value of type null on line 14...

Line 14 is this line of the plugin. The variable $plugin seems not to be populated, probably because this is now extracted out to manifest.json in more recent versions of Textpattern(?). I replaced:

this line:

global $plugin;

with

global $plugin, $plugins_ver, $txp_current_plugin;
if (!isset($plugin)) {
    $plugin['version'] = $plugins_ver[$txp_current_plugin];
}

and the error is silenced and $this->version is populated.


TXP Builders – finely-crafted code, design and txp

Offline

#8 2022-04-19 01:44:52

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

jakob wrote #333125:

ref PHP warning

Thanks Jakob, that does indeed resolves the issue and silences the warning – no more problems with PHP 8.1.5 and both TXP 4.8.8 release and 4.9-dev.

And yes it installs and works on a PHP 8.0.13 + TXP 4.8.8 install (I will test the patch when I get a chance).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#9 2022-04-19 07:52:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

Bloke wrote #328744:

rah_* plugins tend to need composer. We probably should compile those up and offer them as standard installations or (at least) supported .zips.

BTW: GitHub shows that gocom was busy over the weekend and it looks like he’s updated his build / GitHub actions setup so that his plugins are now also (all?*) available as .zip.txt / .txt installer files on the respective /releases page. *I’ve not checked them all but all I checked had releases.

Thanks, Jukka, whever you are :-)


TXP Builders – finely-crafted code, design and txp

Offline

#10 2022-04-19 08:09:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

phiw13 wrote #333126:

jakob wrote #333125:

ref PHP warning

Thanks Jakob, that does indeed resolves the issue and silences the warning – no more problems with PHP 8.1.5 and both TXP 4.8.8 release and 4.9-dev.

I also noticed that Parsedown and Parsedown Extra have been updated since wet’s plugin. as both are simply pasted verbatim into the plugin I tried updating them to the current v1 versions* and that worked fine (simple testing only).

*Both Parsedown and Parsedown Extra have beta v2 branches that seem to be the work of new authors, so that may change again at some point.


TXP Builders – finely-crafted code, design and txp

Offline

#11 2022-04-19 08:30:55

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,162
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

jakob wrote #333130:

I also noticed that Parsedown and Parsedown Extra have been updated since wet’s plugin. as both are simply pasted verbatim into the plugin I tried updating them to the current v1 versions* and that worked fine (simple testing only).

Yes I noticed that too, much after commenting above. Good to know that at least the most recent v1* still works fine.

Is Robert (Wet) still looking after his plugins? Else someone better versed than me in GH arcanes might fork and update the plugin – or put it in to the com- plugins group.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#12 2022-04-19 20:21:53

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: wet_textfilter_markdown plugin and PHP 8.0

phiw13 wrote #333132:

Yes I noticed that too, much after commenting above. Good to know that at least the most recent v1* still works fine.

Is Robert (Wet) still looking after his plugins? Else someone better versed than me in GH arcanes might fork and update the plugin – or put it in to the com- plugins group.

OK, here’s a forked version with warning patched and Parsedown updated from 1.6.0 -> 1.80 beta 7 and Parsedown Extra updated from 0.7.0 -> 0.8.0:

github.com/jools-r/wet_textfilter_markdown

I took the liberty of bumping it up a version and compiling a new txt installer file.

Robert is still around from time to time and I can submit a PR if he is willing.

Note: I can’t vouch for how well the Parsedown and Parsedown Extra updates work but I presume they’ve been battle-tested by its users already. A v2 of that is upcoming it seems but may have breaking changes.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB