Skip to content

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

Open

Description

@paulcalabro

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

Activity

  1. PhrozenByte commented on Dec 7, 2019

    @PhrozenByte
    Member

    Please provide the full stacktrace

  2. paulcalabro commented on Dec 7, 2019

    @paulcalabro
    Author
  3. PhrozenByte commented on Dec 7, 2019

    @PhrozenByte
    Member

    Remove the app and install it again.

  4. paulcalabro commented on Dec 7, 2019

    @paulcalabro
    Author

    Okay, doing that now.

  5. paulcalabro commented on Dec 7, 2019

    @paulcalabro
    Author

    Same error.

  6. PhrozenByte commented on Dec 8, 2019

    @PhrozenByte
    Member

    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.

  7. paulcalabro commented on Dec 8, 2019

    @paulcalabro
    Author

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

  8. PhrozenByte commented on Dec 8, 2019

    @PhrozenByte
    Member

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

  9. codejp3 commented on Dec 11, 2019

    @codejp3

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

    Bug submitted there:
    nextcloud/terms_of_service#274

  10. nickvergessen commented on Dec 11, 2019

    @nickvergessen
    Member

    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

  11. PhrozenByte commented on Dec 11, 2019

    @PhrozenByte
    Member

    @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
  12. paulcalabro commented on Dec 14, 2019

    @paulcalabro
    Author

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

  13. rollanders commented on Jan 25, 2020

    @rollanders

    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?

  14. rollanders commented on Jan 31, 2020

    @rollanders

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

  15. hbdtech commented on Feb 7, 2020

    @hbdtech

    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

  16. pinned this issue on Apr 10, 2020
  17. mokkin commented on Apr 15, 2020

    @mokkin

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions