Skip to content

lessons or quizs not display, in edit course page #526

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

Open
cb360 opened this issue Oct 15, 2022 · 5 comments
Open

lessons or quizs not display, in edit course page #526

cb360 opened this issue Oct 15, 2022 · 5 comments

Comments

@cb360
Copy link

cb360 commented Oct 15, 2022

I have repeatedly installed this plugin in the past two days. It was good at first, but after using it, the lessons and quizs under the chapters on the course editing page cannot be displayed.

When I check mysql, lessons and quizs are associated with the course, but they are not displayed.

I cloused all plugins

wordpress version: 6.0.2
learnpress version: 4.1.7.2

image

image

image

image

These contents were added a few hours ago, and they can be displayed. Now no matter how I add them, they will not be displayed in the list of this editing page after saving, but they are viewed in the lessons or quizs, and are associated with the course.

@cb360
Copy link
Author

cb360 commented Oct 15, 2022

GIF 2022-10-15 23-25-40

updated,name “111” the lesson is not display in edit page。

GIF 2022-10-15 23-30-20

has associated, but open edit page,it‘s not display.

@tungnxt89
Copy link
Collaborator

Hi cb360,

It can be an error from CURL, please install LP v4.1.7.3.2-beta-1 and check to have any errors like the image https://ibb.co/kh77vxq

Thanks.

@admintrama
Copy link

Good afternoon,

As far as I could check about this issue that i have too, it’s that learnpress isn’t overwriting _lp_info_extra_fast_query in postmeta table for course entry.

Each time you save a lesson on a course, learnpress save that relation on its database in learnpress_section_items… but on control panel ignores that, because it uses that parameter on postmeta.

The weirdest thing is that for same post id it saves two times the same meta_key (“_lp_info_extra_fast_query”), but in any case, it ignores whatever you save on wordpress control panel about the course.

@tungnxt89
Copy link
Collaborator

Hi admintrama,

We save it to "_lp_info_extra_fast_query" to make the query list item of course faster. Use wp_remote_post to run background, but some site error with it, an error like https://ibb.co/kh77vxq. or You can install plugin facebook-for-woocommerce to check background has run normally.

Thanks.

@mlinxfeld
Copy link

Hi,
Just confirming that this issue is still present in LearnPress 4.2.8.2 and causes real data inconsistency.

Here’s what happens:

When adding lessons to a section via the course editor (Vue-based UI), a direct AJAX call (LP.Request with type: 'add-items-to-section') is triggered immediately.

This call writes to the database table wp_learnpress_section_items — even before clicking the “Save” button in the admin panel.

If you add multiple lessons in a row without saving, the same item_order is reused, causing duplicate item_order values in the database.

As a result, the curriculum structure becomes unreliable until manually fixed in SQL or by reordering in the UI.

Expected behavior:

These lesson additions should only modify the local Vuex state until the user explicitly clicks “Save.”

Only then should the full state of the curriculum be persisted to the database.

As a workaround, I commented out the call to LP.Request({ type: 'add-items-to-section' }) inside modal-course-items.js, which makes the UI behave correctly – changes are kept in memory until saved.

Please consider reviewing this logic in future updates. It’s a critical UX flaw and a data integrity issue.

Thanks!

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

4 participants