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

Craft 5 fix #48 #51

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

Stalex89
Copy link

@Stalex89 Stalex89 commented Jan 28, 2025

Solution for #48

Based on similar errors happening on other plugins (link), I've added the array_filter wrapper to filter null elements in array.

Needs some testing but for me it doesn't throw an error anymore when opening/saving an entry in CMS.

@Stalex89 Stalex89 closed this Jan 28, 2025
@Stalex89 Stalex89 reopened this Jan 28, 2025
@Stalex89
Copy link
Author

Update: GraphQL was throwing an error of missing key in array of pins, removing/recreating the pins has fixed the error

@andrewmenich
Copy link
Contributor

andrewmenich commented Jan 29, 2025

@Stalex89 Thank you for the PR! I'll get this rolled out ASAP

ETA: Regarding the GraphQL error, if you have a database backup that you're able to share prior to you recreating the pins, that would be a huge help in tracking down the issue and making sure others don't run into a scenario where they have to re-add a bunch of pins! You can email it to [email protected] if you're able to share.

@andrewmenich andrewmenich merged commit cbde3b8 into simplygoodwork:craft-5-develop Jan 29, 2025
@Stalex89
Copy link
Author

Stalex89 commented Jan 30, 2025

Hi @andrewmenich, thank you for plugin update!

I have tried to recreate the GraphQL error I got with using the pre-update database, but unfortunately I was not able to reproduce the error. As far as I remember it happed only on one page (matrix section (entry type) with a Donkeytail field), but all other pages didn't have this error on querying. The error message complained that it couldn't find an entry by key (entry id) in array in pin id's.

I will write back to you once I will encounter this GraphQL issue once again later or will able to reproduce it.

@Stalex89 Stalex89 deleted the craft-5-fix-48 branch January 31, 2025 13:01
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

Successfully merging this pull request may close these issues.

2 participants