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

[BUG] links in pages widget lost when exhibit page is edited #374

Closed
elrayle opened this issue Sep 3, 2020 · 2 comments
Closed

[BUG] links in pages widget lost when exhibit page is edited #374

elrayle opened this issue Sep 3, 2020 · 2 comments
Assignees
Labels

Comments

@elrayle
Copy link
Contributor

elrayle commented Sep 3, 2020

Describe the bug

Every time I go to edit a page that has the pages widget on it all the links in that widget are just gone and have to be redone. This has happened in all the exhibits I have worked on and every time I go to edit a page with that particular widget on it. I have attached screenshots of the “before” (i.e. all the pages linked) and then what happens as soon as I go to Edit—(i.e. no links there).

To Reproduce

Steps to reproduce the behavior:

I assume the same will happen to you if you just click on Edit on a page that uses the pages widget since this has happened to me in all three exhibits I have worked on and every single time I have used the pages widget.

Expected behavior

I expected the links would be preserved if I went in to edit something on the page, just as with all the other widgets.

Additional context

Reported by Jenny Leijonhufvud

@elrayle elrayle added the bug label Sep 3, 2020
@elrayle elrayle self-assigned this Sep 3, 2020
@elrayle elrayle changed the title [BUG] [BUG] links in pages widget lost when exhibit page is edited Sep 3, 2020
@elrayle
Copy link
Contributor Author

elrayle commented Nov 5, 2020

Override of FeaturedPagesBlock #L28 was supposed to only remove pages that didn't exist, but it was actually removing all pages.

This happened because in check parent.exhibit.pages.exists?(v['id']) , v['id'] is the slug id (e.g. 'wild') instead of the record id (e.g. 3). exists? expects to receive a record id.

The following line that gets the thumbnail finds the page using parent.exhibit.pages.find(v['id']) which will find the page given a slug id.

This issue was fixed in Spotlight code, so the override was removed.

@elrayle elrayle closed this as completed Nov 5, 2020
@elrayle
Copy link
Contributor Author

elrayle commented Nov 5, 2020

Fixed by PR #379 - remove cloudfront; remove featured_pages_block override

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant