tstaerk / mediasyntax

Mediasyntax is a plugin for Dokuwiki that enables Mediawiki syntax.
http://www.staerk.de/thorsten/Mediasyntax
GNU General Public License v2.0
10 stars 6 forks source link

Fixing PHP 8.2 compatibility for 2 abandoned plugins mediasyntax and WikipediaSnippet - GitHub Sponsor consulting fee as needed #31

Closed AzureCloudMonk closed 1 year ago

AzureCloudMonk commented 1 year ago

Hi Thorsten and Andy. Andy, I was your first or second monthly GitHub Sponsor several years ago and DokuWiki is my favorite software since 2005!

My ISP is forcing me to update from PHP 7.4.15 to 8.1 or 8.2 which causes my most important DokuWiki plugins to fail (mediasyntax by Thorsten Staerk and WikipediaSnippet Plugin by Anika Henke) which then crashes DokuWiki. https://github.com/dokuwiki/dokuwiki/issues/3971

Andy, In the past 2 years ago when I requested to pay you to update the code of the incompatible https://www.dokuwiki.org/plugin:mediasyntax Mediawiki syntax plugin to work with a newer version of DokuWiki, you kindly did it for free and privately sent me the code files.

I again would like to offer to pay you consulting fees by increasing my GitHub sponsorship or PayPaling you whatever amount you require to fix the 2 abandoned plugins mediasyntax and WikipediaSnippet.

Would it be possible for you to GitHub fork the 2 abandoned plugins (https://github.com/tstaerk/mediasyntax/issues and https://github.com/selfthinker/dokuwiki_plugin_wikipediasnippet/issues/23 and update them publicly to work with PHP 8.2.0 and Release 2023-04-04a “Jack Jackrum”? That way others can benefit from the updates.

Thanks again for your greatly useful amazing DokuWiki!

Cloud Monk Losang Jinpa https://github.com/AzureCloudMonk

tstaerk commented 1 year ago

Hi, could you give me the short Version what I can do for you?

AzureCloudMonk commented 1 year ago

Weirdly, it seems to have solved itself by switching back and forth 2 times on my ISP from PHP 8.2 to 7.4 and then back again to 8.2. Maybe the ISP had some problem with their PHP upgrade process? It is working OK now. Thanks.

tstaerk commented 1 year ago

Thanks, appreciate the offer.

tstaerk commented 1 year ago

Unfortunately, good programmers like Andy are in high demand. However, If you have pull request or a diff in mind I may quickly Check IT in?

AzureCloudMonk commented 1 year ago

Again, thanks 🙏 for your amazing plugin. I am surprised more don’t use your useful plugin since MediaWiki syntax is so popular (even more than MarkDown) and it lets DokuWiki be a simpler to maintain MediaWiki clone.

Do you plan to fix the 404 File Not Found on your download hyperlink https://www.staerk.de/thorsten/Mediasyntax here in GitHub and on https://www.dokuwiki.org/plugin:mediasyntax ? It might make the plugin easier to use for newbies who like to install and update plugins from the DokuWiki Admin Extension Manager UI.

AzureCloudMonk commented 1 year ago

One more thing? Where is your “GitHub Sponsor” button (https://github.com/sponsors/tstaerk) or Patreon or a “buy me a beer 🍺” link? Can I PayPal you a thank you donation?

AzureCloudMonk commented 1 year ago

SUMMARY: mediasyntax Plugin on Jackrum on PHP 8.2 gets "Attempt to assign property "toplevel_id" on null"

Hi, The problem is back again on my other DokuWiki installs when I upgrade from PHP 7.4 to any 8.x.

When using PHP 8.2 FastCGI or PHP 8.0 FastCGI with a new virgin install of DokuWiki version "2023-04-04a Jack Jackrum" with latest code from https://github.com/tstaerk/mediasyntax, I get the following error:

Error: Attempt to assign property "toplevel_id" on null An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the mediasyntax plugin.

More info has been written to the DokuWiki error log.

If I switch back to using PHP 7.4 FastCGI the problem disappears.

Weirdly, on one of my 10 different DokuWiki websites, It seems to have solved itself by switching back and forth 2 times on my ISP from PHP 8.2 to 7.4 and then back again to 8.2. Maybe the ISP had some problem with their PHP upgrade process? But on my website https://www.ayurvedic.io/doku.php?id=start&do=admin&page=extension&tab=search&q=mediasyntax when I install the MediaSyntax plugin, I get the same error of: Attempt to assign property "toplevel_id" on null". Switching back and forth between ISP PHP versions 7.4 and 8.2 is NOT solving it.

Here is my DokuWiki error log from LogViewer:

2023-05-21 23:24:28

Error: Attempt to assign property "toplevel_id" on null /home/a7j5do2x9y5qkr8v2k/devopscloud.io/lib/plugins/mediasyntax/action.php(71)

0 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/EventHandler.php(80): action_plugin_mediasyntax->handle_parser(Object(dokuwiki\Extension\Event), NULL)

1 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(74): dokuwiki\Extension\EventHandler->process_event(Object(dokuwiki\Extension\Event), 'BEFORE')

2 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(132): dokuwiki\Extension\Event->advise_before(false)

3 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Extension/Event.php(199): dokuwiki\Extension\Event->trigger(NULL, false)

4 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parser/handler.php(137): dokuwiki\Extension\Event::createAndTrigger('PARSERHANDLER...', Object(Doku_Handler))

5 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/Parsing/Parser.php(123): Doku_Handler->finalize()

6 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(234): dokuwiki\Parsing\Parser->parse('\n==Denmark==\n\nR...')

7 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(198): p_get_instructions('==Denmark==\n\nRe...')

8 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(525): p_cached_instructions('/home/a7j5do2x..', false, 'denmark')

9 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/parserutils.php(299): p_render_metadata('denmark', Array)

10 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/inc/common.php(266): p_get_metadata('denmark')

11 /home/a7j5do2x9y5qkr8v2k/devopscloud.io/doku.php(97): pageinfo()

12 {main}

P.S. I also posted here: https://forum.dokuwiki.org/d/21100-mediasyntax-on-jackrum-php82-attempt-to-assign-property-toplevel-id-on-null

tstaerk commented 1 year ago

I merged the pull request without testing because I appreciate splitbrain so much. As soon as I get to it, I can test it. Before, if anyone else tries it, I would welcome a note if it fixes the issue.

AzureCloudMonk commented 1 year ago

Hi Andi,

I finally got a chance to install your fixes, and now get a new error:

“ dokuwiki\Exception\FatalException: Array and string offset access syntax with curly braces is no longer supported

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the mediasyntax plugin.

More info has been written to the DokuWiki error log.”

I will give you my error log if you need it.

https://www.devopscloud.io/doku.php?id=dokuwiki

Thanks.

Again, thanks for your help on this.

AzureCloudMonk commented 1 year ago

Here is my DokuWiki error log once I install the latest plugin:

2023-06-29 12:27:30 E_COMPILE_ERROR: Array and string offset access syntax with curly braces is no longer supported /home/USERNAME/devopscloud.io/lib/plugins/mediasyntax/helper.php(376)

0 [internal function]: dokuwiki\ErrorHandler::fatalShutdown()

AzureCloudMonk commented 1 year ago

The old error was solved with your May 23 fixes. It was:

Error: Attempt to assign property "toplevel_id" on null

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the mediasyntax plugin.

More info has been written to the DokuWiki error log.

tstaerk commented 1 year ago

Please Tell me where I Link to www.staerk.de/thorsten/Mediasyntax

AzureCloudMonk @.***> schrieb am Di., 23. Mai 2023, 22:52:

Again, thanks 🙏 for your amazing plugin. I am surprised more don’t use your useful plugin since MediaWiki syntax is so popular (even more than MarkDown) and it lets DokuWiki be a simpler to maintain MediaWiki clone.

Do you plan to fix the 404 File Not Found on your download hyperlink https://www.staerk.de/thorsten/Mediasyntax here in GitHub and on https://www.staerk.de/thorsten/Mediasyntax ? It might make the plugin easier to use for newbies who like to install and update plugins from the DokuWiki Admin extensions UI.

— Reply to this email directly, view it on GitHub https://github.com/tstaerk/mediasyntax/issues/31#issuecomment-1560109124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPMQ2ZRM6CBWEAUNITJI3XHUPQ3ANCNFSM6AAAAAAYFX3VLY . You are receiving this because you commented.Message ID: @.***>

tstaerk commented 1 year ago

Many thanks... I have a Job at Google Cloud and I am 100% dedicated to IT 😃

AzureCloudMonk @.***> schrieb am Di., 23. Mai 2023, 22:55:

One more thing? Where is your “GitHub Sponsor” button or “buy me a beer 🍺” link? Can I PayPal you a thank you donation?

— Reply to this email directly, view it on GitHub https://github.com/tstaerk/mediasyntax/issues/31#issuecomment-1560111824, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACPMQYJ7UTCTCUC3SDOOOTXHUP2TANCNFSM6AAAAAAYFX3VLY . You are receiving this because you commented.Message ID: @.***>