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

page-explorer periodically stops working #58

Closed
DeliriumCode opened this issue May 1, 2023 · 8 comments
Closed

page-explorer periodically stops working #58

DeliriumCode opened this issue May 1, 2023 · 8 comments

Comments

@DeliriumCode
Copy link

DeliriumCode commented May 1, 2023

After a clicking on maybe the third or so page link generated from the page-explorer control, all the page explorer links disappear
Clearing the cache sometimes causes it to come back.

I have a basic wiki setup with the following sidebar:

<bar background-color="gradient-light" color="secondary" line-spacing="md">
<btn width="fit">
[[getting_started]]
</btn>

**Support Groups**
<page-explorer tree line-spacing="xs" ns="support_groups:"></page-explorer>
**Social Groups**
<page-explorer tree line-spacing="xs" ns="social_groups:"></page-explorer>
**Crisis**
<page-explorer tree line-spacing="xs" ns="crisis:"></page-explorer>
**Events** 
<page-explorer tree line-spacing="xs" ns="events:"></page-explorer>
**Medical**
<page-explorer tree line-spacing="xs" ns="medical:"></page-explorer>
**Services**
<page-explorer tree line-spacing="xs" ns="Services:"></page-explorer>
**Organisations**
<page-explorer tree line-spacing="xs" ns="organisations:"></page-explorer>
**User Content**
<page-explorer tree line-spacing="xs" ns="user_content:"></page-explorer>
**Wiki** 
<page-explorer tree line-spacing="xs" ns="wiki:"></page-explorer>
</bar>
@DeliriumCode
Copy link
Author

This looks like it was caused by not having a preceding : in the ns=
i.e.
Changing
<page-explorer tree line-spacing="xs" ns="support_groups:"></page-explorer>
to
<page-explorer tree line-spacing="xs" ns=":support_groups:"></page-explorer>
Resolves this issue...

@gerardnico
Copy link
Member

Thanks for reporting.

The ns attribute takes the default value of the requested page. I added it for documentation purpose.

If you use the same sidebar, you just need to create one at the root with:

<page-explorer tree line-spacing="xs" ></page-explorer>

I check the bug.

@gerardnico gerardnico reopened this May 2, 2023
@DeliriumCode
Copy link
Author

DeliriumCode commented May 2, 2023

So i wanted control over the order. I also wanted the sidebar to be the same on all pages rather than just the current namespace.

@gerardnico
Copy link
Member

Ah ok ... I get it. Nice!

@gerardnico
Copy link
Member

You should use a box in place of a bar. ie

<box background-color="gradient-light" color="secondary" line-spacing="md">
</box>

The name bar is not good as it's much more a big chunk section of a whole page.
It responds to the container when the page layout is a landing page.

@gerardnico
Copy link
Member

I try to reproduce your error but I couldn't figure it out. I have added a guard so that it will not happen again. Thanks for trace. Really helpful and all the best with your publication.

@DeliriumCode
Copy link
Author

So i think it is linked to when the cache of the page-explorer is generated and the current page.

If you turn off caching, it works on the root page but not the child pages as i wasn't putting a : before the ns part.

so user navigates to site, it all works. If the cache gets invalidated, its regenerated based off the current page.

@gerardnico
Copy link
Member

Caching is a bad beast. Thanks for the feedback. I will look at it.

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

2 participants