pnp / custom-learning-office-365

Microsoft Learning Pathways end user learning solution for Microsoft 365 customers.
MIT License
225 stars 207 forks source link

Metadata/ Playlist/ Asset titles are not fetched in UI but is displayed in Admin Centre #773

Closed Jeyeline closed 4 months ago

Jeyeline commented 5 months ago

Describe the bug

We have added a few categories and its relevant sub categories are added in the json file (metadata/ its playlist / its asset), and the code is pushed and committed. However, it is not being reflected the learning centre. However, in admin centre it is displayed. As it is not solved after multiple pushes, we were in a situation to create manually in UI.

We are raising the issue, since we faced this issue every incremental pushes

To Reproduce

In the published page, add few categories and its relevant title and push it again

Expected behavior

Once the code is pushed, the change has to be relflected

Screenshots

Admin The subcategory list is displayed here

sharepoint It is not reflected here

Learning Pathways version number

Please share the version number of learning pathways in your tenant app catalog.

dcashpeterson commented 5 months ago

@Jeyeline Are you using a custom content pack for this content so when you say pushes and commits you have a custom content pack and you make changes and commit them to a private GitHub repo? If so have you tried emptying the cache in the lists in the backend? This sounds like a caching issue because the webpart doesn't have any understanding that the content has updated.

Jeyeline commented 5 months ago

@dcashpeterson We are using a public repo forked from here. If it is about the cache, how it should be cleared?

dcashpeterson commented 5 months ago

@Jeyeline a fork of this repo where you are directly editing the JSON would be considered a custom content pack. So there are a few things you should try.

First check your Learning Pathways Admin. In the webpart you should see a second tab next to Microsoft 365 Learning Pathways as shown in the picture below. Take note of the display name. The URL should be pointing to you fork. image

On the page that you have your webpart added edit the page and edit the properties of the webpart. Make sure that the Learning Source is set to your custom content pack display name from the previous step. image

If both of these are set up properly then you should manually empty the cache.

In the Administration site for Learning Pathways go to Site Contents > CustomConfig list.

Filter all the items by title CustomConfig. Select all of the items and delete them.

In a separate browser window/tab navigate to the home page for Learning Pathways Admin. As the webpart starts to load you should see the CustomConfig items start to regenerate. After that you can navigate to the page with the webpart on it and do a hard refresh of the page. This should fix the issue.

Jeyeline commented 5 months ago

Hello @dcashpeterson , we have performed the first two steps. If we perform a hard refresh by removing the custom configuration, will it impact my pages, or does it solely affect the cache?

dcashpeterson commented 5 months ago

There will be a short performance hit while the cache is being regenerated but that will be it. Another thing would be to remove any languages that you are not using. That will minimize the length of time it takes to regenerate the cache.

Jeyeline commented 5 months ago

@dcashpeterson , only 30 items are loaded by default, if we scroll down, the page gets hung. Shall we delete the custom configuration that is in the image? Will it be regenerated?

custom

Jeyeline commented 5 months ago

@dcashpeterson / Team,

After deleting the cache, still facing the same issue. In the admin, all the titles are displayed, not in my custom-created path. attaching the screenshot. admin custom

dcashpeterson commented 5 months ago

@Jeyeline are you sure you deleted all the items with the title CustomConfig from the CustomConfig list? There are over 3000 items in that list and if you had deleted all the custom config items there shouldn't be that many event with a custom content pack. Also, can you please provide a screenshot showing the default language of the site Site Setting > Language Settings and a screen shot of one of the assets that isn't showing.

Jeyeline commented 5 months ago

@dcashpeterson , I deleted that file itself. Please find the SS of language settings and Category-Sub Category- Playlist-Asset in admin page

image

language

dcashpeterson commented 5 months ago

@Jeyeline Can you create a view in the CustomConfig list and group the items by Title and then show the count of the different items? I am not sure what all 3000 items are in that list.

Jeyeline commented 5 months ago

@dcashpeterson we deleted the file. since it will re-generate, will take a snapshot share

dcashpeterson commented 5 months ago

Just to be clear this is what I am looking for image

Jeyeline commented 5 months ago

@dcashpeterson , please find the same github

dcashpeterson commented 5 months ago

@Jeyeline if you only have one language are the 30 CustomConfig items recent? Also can you post a few more screen shots. For your Admin screen can you show the top of the webpart like this image

and on the webpart that isn't working show the webpart configuration screen? image

Also, on the page where the webpart isn't working can you please check the console and let me know if there are any errors that have an icon like this 🎓 near it.

Jeyeline commented 5 months ago

Hi @dcashpeterson ,

Please find the information image1 image2

In console, we are not having error with that icon, rather having a message stating the tenant id with that icon

dcashpeterson commented 4 months ago

@Jeyeline sorry for the delay on this. I didn't forget. I'm trying to think of the best way to tackle this. It is most likely a caching or configuration issue. Question, when you look in the json in the CustomConfig items in the CustomConfig list do you see any of your assets in there? The values should be in the JSON.

dcashpeterson commented 4 months ago

Closed due to inactivity. If this is still an issue please create a new issue and reference this one.

github-actions[bot] commented 3 months ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.