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

The Access Plan Button Settings > Access Plan of the Access Plan Button Block can only display a maximum of 10 plans, #2526

Open
3 of 4 tasks
dominiquemariano opened this issue Sep 25, 2023 · 3 comments
Labels
Severity: Normal Status: Needs Code This issue needs code to be fixed Type: Bug Bugs and errors

Comments

@dominiquemariano
Copy link

Reproduction Steps

  1. Start with a fresh installation of WordPress and LifterLMS, with no course imports.
  2. Create two new courses in WordPress Dashboard > Courses.
  3. Create 6 access plans for each course.
  4. Create a third course.
  5. Drag and drop the Access Plan Button block in the content area of the third course.
  6. Under Access Plan Button Settings > Access Plan, you'll notice that only 10 access plans are listed.

Expected Behavior

All 12 access plans must show up.

Actual Behavior

Not all 12 access plans showed up. Only 10 did.

This issue has been recreated:

  • Locally
  • On a staging site
  • On a production website
  • With only LifterLMS and a default theme
@chrisbadgett
Copy link
Member

I believe this limitation of the access plan count maximum was a performance consideration. I believe there may already be a workaround (filter or hook / gist) if someone wants to override the limit and take the performance hit. I'm ok with increasing the maximum if engineering sees it as not a significant performance tradeoff.

@actuallyakash actuallyakash added the Type: Enhancement Improvements existing features or code label Sep 26, 2023
@actuallyakash
Copy link
Contributor

Slack convo

@eri-trabiccolo eri-trabiccolo added Type: Bug Bugs and errors Severity: Normal and removed Type: Enhancement Improvements existing features or code labels Sep 27, 2023
@eri-trabiccolo
Copy link
Collaborator

The problem is that the number of access plans that are going to populate the select is fetched via the rest api, which, by default, returns the first 10 items.

path: '/llms/v1/access-plans',

This problem seems to affect all the new blocks that are using selects with data fetched via rest api.

We can fetch the last 100 items, but that would be a workaround. Maybe enough for now.
The best would be, though, using a search box like the one we use in the Enrollment Visibility option:
screenshot-20230927_133848_982188175

@eri-trabiccolo eri-trabiccolo added the Status: Needs Code This issue needs code to be fixed label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Severity: Normal Status: Needs Code This issue needs code to be fixed Type: Bug Bugs and errors
Projects
Status: To do
Development

No branches or pull requests

4 participants