Hi,
This will be difficult for me to track down, as I do not use Learndash.
Could you check in the source code of those pages whether the shortcode is correctly rendered to <span class="katex-eq">...</span>
? If the HTML elements are correctly created, it’s likely that the plugin’s front-end scripts are not getting enqueued correctly. Perhaps these report pages are technically on the admin side (https://example.com/wp-admin)?
Hi,
You are fast, TY for your answer!
I have checked on the wp pro quiz modal window and in the source code, the only lines with “katex” are the following ones (except CSS ones…): https://ibb.co/JRHsfGM
I don’t know if it helps you… (I hope!)
Thank you again for your support.
Thank you! That’s interesting. This means the front-end scripts are actually enqueued.
What do the shortcodes you typed show up as in the source code? Are they shown on the page and in the page’s source code as just what you entered, i.e., [katex]...[/katex]
?
Depending on how Learndash works, if the content is loaded only after the page load it won’t show in the source code, so you might have to use the browser console to see how it shows up as HTML (usually you can bring it up with F12). You can use the “inspector” to navigate to where you see the KaTeX.
Hi,
Thanks again for your answer!
There is no [latex]...[/latex] shortcodes in the page source code. On the front end, I can see [latex]...[/latex] shortcodes, but they don’t work. When I inspect the page, I can see the shortcodes but it seems to be a text element… I don’t really know if it is normal or not…
The following pictures show what I see on the front-end and with the inspector:
https://ibb.co/DQ2B6jS
https://ibb.co/RvzTF3y
Does it help you?
Thank you. The shortcodes are not being rendered to HTML. It looks to be an issue with Learndash: they are not correctly evaluating shortcodes for the fetched content.
Would you be able to check whether other third-party plugin shortcodes do work there?
Hi,
TY for this idea.
I have just tried with WP Download shortcodes and they work. Strange…
As you can see on this link, the WP Download shortcode works but not the [latex] one: https://ibb.co/6gwL2hc
Thank you, that’s very helpful. I’ve just released version 2.2.2. I think the problem is solved in that version; please check it out and let me know.
TY for your reply and for this update. Just updated to 2.2.2 and the problem is the same as you can see in this picture: https://ibb.co/N1V6nwk
Btw it is very nice to try to find a solution. Highly appreciated!
That’s surprising.
Hm, if doesn’t work in 2.2.2, then I’m really not sure where the issue would be, and it’s hard to debug like this.
Could you try using the [katex]
shortcode instead of [latex]
, just to rule one more thing out?
If that still doesn't work, I think the issue is very likely to be on Learndash's side after all.
Hi,
I know, it is strange…
Just tried with [katex] shortcodes but it doesn’t work…
You really think there is no other solution on your side? It is very disappointing, because I love your plugin that is very efficient :).
I changed the only thing I could think of that might’ve caused this.
My suggestion is to contact Learndash and send a link to this thread. They’ll have a good understanding of their asynchronous fetching of content so they’ll be able to fix this or give some pointers.
I’ll go into a bit of technical detail about my thinking for the change in 2.2.2. In this new version the shortcodes are now immediately registered, rather than only as a callback from the init
hook as prior to 2.2.2.
So now in 2.2.2, on any page load, these shortcodes will be registered. Any content with [katex]
should get handled automatically (and also [latex]
, if the option is set). My thinking thus is, if the shortcode is not handled, then the process fetching the content is doing something wrong.
I don't know why the other plugin you tested seems to work. What's the full name of that plugin?
OK, thank you for this help. I will do this right now! The shortcode that works is from “Download Manager” plugin.
Whatever, I highly appreciate your help, so I have 2 questions:
– How can I donate for your work?
– Would you be interested in doing customization service for wordpress Learndash websites? (we often need custom jobs but we don’t know reliable person… and you seem to be one!).
TY. Keep you in touch with what Learndash will tell me.
Thank you. I’ve had yet another look and actually might’ve found the real cause. Released as 2.2.3. Please let me know if it works for you. If it does, it was kind of a silly mistake on my part.
A donation is by no means necessary, but of course it would be very much appreciated!
If PayPal works for you, my account is thomas [ at ] churchman [ dot ] nl
.
Regarding customization services: I’m not familiar with Learndash, but we can always have a chat. You can reach me on the address as above.
No word, just a picture: https://ibb.co/KWXcs7D