Last week I started creating a new course in version 3.6.1 and there is a lot to like about the new presentation and using blocks in that.
In working with both Sensei LMS and Sensei LMS with WC paid course we noticed a few issues:
When I looked in the code I saw that the title of the "Take Course" button goes through, __() but the default value isn't and the "Contact Teacher" button text isn't at all. I haven't checked the course outline block, but it is also presenting in the English language.
I wanted to try wrapping the "Contact Teacher" strings in __() (also in the dist folder) but wasn't able to get it translated that way. But it is not good when in a Dutch nationalized WordPress install the blocks aren't translatable, not to speak about systems that run in multiple languages. All sensei elements, including the course outline and woocommerce purchase course button remain in English, so it seems Sensei LMS isn't translating any of them.
I found that I can manually change the button texts, but that broke the buttons layout on the frontend in my genesis child theme (although it worked in twentytwentyone, but there sensei styling changed the button styling in the demo footer too). That can of course be fixed with css, but it means adding customization work, where it shouldn't be necessary. And dynamically generated buttons will not be translatable that way, so they surely need to be translatable via a .mo file.
I expected the blocks to be in the language of the WordPress installation and the output to be internationalized.
All sensei buttons and other blocks in the default course post_type template remain in the English language and don't seem to be translatable by a .mo file. The 'Contact Teacher' button on the lesson page is localized, but all sensei buttons (blocks) on the course page don't appear to be.
php v7.4.x and v8.0.0
sensei v3.6.1
wp v5.6
Firefox dev version
Windows 10
whenever a lesson was saved, the lesson order in the course was being reshuffled
Do you know if you have some kind of object caching done by the hosting provider, or by a plugin?
@yscik
Sorry, I don't know about that. We have use wp-rocket for caching and for handling the scripts and css. And we use phastpress to convert the jpg images to webp format. I know wordpress itself performs caching too, but the details of that I don't know.
The website that had the problem runs on a WPO starter plan at Bigscoots. I could ask them if they have setup something like that. Is there anything specific you need to know? I dont have access to the setup myself, so I would have to ask.
In dealing with the problem, I have solved it first by filtering the get_metadata call, but that only fixed the course page and not the pagination within the lessons. So now I just use update_metadata to update all lessons before usage. It's a crude fix, but for now it was the only thing I could think of. Basically I had to hardcode the database outside of sensei LMS to fix it. It means running 47 meta updates that I rather remove.
@yscik Bigscoots support says: By default, the only object caching that we can provide is with the Redis instance, but you are not using it currently.
So we have no server setup right now for object caching outside the caching that wp-rocket adds to core wordpress.
I opened issue #3921 for the lesson order bug, since this one was mainly for the translation issue. My analyses of what I found in the code, about why the lesson order is changed, is described there.
reported in 3687642-zen; reports both "Take Course" and "Complete Purchase" translation issues.
3707563-zen
Fixed in #3919