Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined method ParsedownExtra::textElements() #97

Open
paulcalabro opened this issue Dec 7, 2019 · 16 comments
Open

Call to undefined method ParsedownExtra::textElements() #97

paulcalabro opened this issue Dec 7, 2019 · 16 comments

Comments

@paulcalabro
Copy link

paulcalabro commented Dec 7, 2019

Hi,

I'm getting 500s when trying to access my website (previously this had worked). In my nextcloud.log file, I see the following:

":3,"time":"2019-12-07T18:48:06+00:00","remoteAddr":"<REDACTED>","user":"<REDACTED>","app":"index","method":"GET","url":"\/index.php\/apps\/cms_pico\/pico\/tutorials","message":{"Exception":"Exception","Message":"Call to undefined method ParsedownExtra::textElements()","Code":0,"Trace":[{"file":"\/var\/www\/html\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args"

Version info:

  • Pico CMS: 1.0.2
  • Nextcloud 17.0.1

The only things that have changed are:

  • Upgrades for Nextcloud
  • Upgrades for Pico CMS and other apps

I suspect it might be related to this recent change:

0429d86#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780

@PhrozenByte
Copy link
Collaborator

Please provide the full stacktrace

@paulcalabro
Copy link
Author

Okay, here's the stack trace:

https://gist.github.com/paulcalabro/eedfa66593f46085cde2332864fde556

@PhrozenByte
Copy link
Collaborator

Remove the app and install it again.

@paulcalabro
Copy link
Author

Okay, doing that now.

@paulcalabro
Copy link
Author

Same error.

@PhrozenByte
Copy link
Collaborator

PhrozenByte commented Dec 8, 2019

This is very likely caused by a conflicting other app that also uses Parsedown, but an older version of it. I'm afraid we can't really do anything about that. You must remove the conflicting app (none of the shipped/default ones) to get Pico CMS for Nextcloud working.

@paulcalabro
Copy link
Author

What's a good approach to identifying the conflicting app?

@PhrozenByte
Copy link
Collaborator

Disable custom apps one after another until Pico CMS for Nextcloud works.

@codejp3
Copy link

codejp3 commented Dec 11, 2019

I just experienced the same issue. The offender - Terms Of Service

Bug submitted there:
nextcloud/terms_of_service#274

@nickvergessen
Copy link
Member

nickvergessen commented Dec 11, 2019

Hi @PhrozenByte , nickvergessen here, the author of the ToS app.

We are currently still using the 1.7.3 version. When I checked versions, I saw you are even running a beta version? Not sure I like this too much. Would 1.7 as the latest stable release be okay for you as well, or what particular reason makes you run the beta rather then a stable version?

Edit: checking composer.lock ToS is actually using 1.7.3

@PhrozenByte
Copy link
Collaborator

PhrozenByte commented Dec 11, 2019

@nickvergessen: Aidan Woods took over development of Parsedown two years ago (I was kinda into Parsedown's development this time, too). He did an amazing job, like allowing Parsedown to handle untrusted input and improving CommonMark compatibility. However, Parsedown's release process got a bit... confusing.

Aidan is currently working on Parsedown 2.0, basically a rewrite from scratch. He initially planned to improve Parsedown gradually, however, this didn't work out well. Parsedown's code base is pure chaos. You can't really work on it without breaking previous behaviour. However, there were a lot of super annoying bugs (including security issues when dealing with untrusted input), so he decided to fix them nevertheless. This ended up being Parsedown 1.7. Everything else that wasn't considered to be "too annoying", got into Parsedown 1.8.

One of the biggest issues of Parsedown is that it has no extension API. However, there are indeed a lot of Parsedown extensions out there, including the official Parsedown Extra. All the changes Aidan made didn't affect Parsedown's public API, but it's internal behaviour, affecting extensions. So many extensions stopped working with Parsedown 1.7 - including Parsedown Extra. Development of Parsedown Extra is basically abandoned (and will likely stay abandoned, because it's no longer necessary when improving CommonMark compatibility). However, Aidan created a beta release of Parsedown Extra 0.8 extending Parsedown 1.8. Both are in beta. So, if you wanna use Parsedown Extra, you can choose whether you want to use Parsedown Extra 0.8 beta with Parsedown 1.8 beta, or Parsedown Extra 0.7 with Parsedown 1.6.

So, why is Parsedown 1.8 still in beta, it's code was mostly written mid 2018? Because Parsedown 1.8 is a very early snapshot of the code that much later became Parsedown 2.0. There will never be a stable Parsedown 1.8. However, Parsedown 2.0 isn't expected in the near future, too.

Parsedown 1.8 beta is as stable as Parsedown 1.7. Not sure whether "stable" is the right phrase, they do what they are supposed to do, but with a lot of issues. There aren't more issues with Parsedown 1.8 beta then with Parsedown 1.7, they are equally "stable".

To sum up, there are two reasons for Parsedown 1.8 beta:

  1. If you wanna use Parsedown Extra, you must use Parsedown 1.8 beta (unless you wanna rely on Parsedown 1.6 with a lot of known and super annoying issues)
  2. Parsedown 1.8 beta is just as stable as Parsedown 1.7

@paulcalabro
Copy link
Author

paulcalabro commented Dec 14, 2019

I've disabled the ToS app to resolve the issue.

@rollanders
Copy link

This bug makes it impossible to use social login and PicoCMS on the same site. I am very sorry for that. I have used PiciCMS as an Intranet solution for communication to our users (currently 60 but potentially probably 3 times larger). Do I understand that you do not intend to solve this issue?

@rollanders
Copy link

rollanders commented Jan 31, 2020

@nickvergessen @PhrozenByte I will lift this issue as important to solve. I want both social login and PicoCMS

@hbdtech
Copy link

hbdtech commented Feb 7, 2020

Currently on NC 18 and was having the error Exception: Call to undefined method ParsedownExtra::textElements() but I don't have the Terms of Service app installed. Was finally able to find that the Issue Template 0.6.0 app causes this error also. After disabling this app my site loads. Thanks

@mokkin
Copy link

mokkin commented Apr 15, 2020

I can confirm this on Nextcloud 19 beta2 with the issue template app.
Right after deactivating it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants