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

Installing and activating the plugin breaks the server, "Uncaught TypeError: A.registerCodeBlockComponent is not a function" #3

Open
a3nm opened this issue Mar 26, 2020 · 4 comments

Comments

@a3nm
Copy link

a3nm commented Mar 26, 2020

Hi, I'm trying to install the LaTeX plugin, specifically https://github.com/kosgrz/mattermost-plugin-latex/releases/download/v0.0.2/com.mattermost.latex-plugin-0.0.2.tar.gz

Once uploaded and enabled, the Mattermost server no longer works (nothing appears when loading a page). The Javascript console indicates the following error:

Uncaught TypeError: A.registerCodeBlockComponent is not a function
    at A.value (com.mattermost.latex…9ab15e5_bundle.js:1)
    at index.js:128
    at HTMLScriptElement.i.onload (index.js:92)

in /static/plugins/com.mattermost.latex-plugin/com.mattermost.latex-plugin_fc4c86ab99ab15e5_bundle.js

[To repair this, the plugin needs to be removed with the command line interface (./bin/mattermost plugin disable com.mattermost.latex-plugin && ./bin/mattermost plugin delete com.mattermost.latex-plugin && service mattermost restart.]

This is Mattermost Enterprise Edition, version 5.21.0. Any idea of how this could be fixed? Many thanks!

@michaelcadilhac
Copy link

michaelcadilhac commented Apr 25, 2020

It seems that registerCodeBlockComponent is a function with one (!) occurrence on the internets, and this is in this package. It does not look like this function has ever been in mattermost, has it?

This was the PR introducing the function: https://github.com/mattermost/mattermost-webapp/pull/3004/files

As far as I can see, the whole project of moving LaTeX out of mattermost core and into a plugin has become a "won't do" as of this month.

https://mattermost.atlassian.net/browse/MM-5998

However, it does seem that inline LaTeX (with `latex x` ) has disappeared...

EDIT: My bad, it seems that inline LaTeX has never been in the codebase, it was a local change (michaelcadilhac/mattermost-webapp@dc793cd)

@a3nm
Copy link
Author

a3nm commented Apr 26, 2020

Thanks @michaelcadilhac for looking into this. So I'm a bit confused: migrating LaTeX support to a plugin won't get done as per https://mattermost.atlassian.net/browse/MM-5998, but is there still LaTeX support in mattermost itself? On my Mattermost instance, trying to input a latex code block as in https://docs.mattermost.com/help/messaging/formatting-text.html doesn't result in any LaTeX formatting.

About inline LaTeX, yes I figured out it was your local change (and it's a pretty useful feature indeed!).

@michaelcadilhac
Copy link

@a3nm It's still in the code base of the webapp, you do need to activate it in the System Console though!

@a3nm
Copy link
Author

a3nm commented Apr 26, 2020

Ah right, I hadn't realized this. It works, thanks! So I guess this repository is just obsolete.

And as for inline LaTeX I guess you can no longer have it unless trying to reapply the changes you had made. :)

Thanks again Michaël for the help!

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

No branches or pull requests

2 participants