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

Error on saving block #323

Closed
SpyrexDE opened this issue Aug 1, 2023 · 14 comments
Closed

Error on saving block #323

SpyrexDE opened this issue Aug 1, 2023 · 14 comments

Comments

@SpyrexDE
Copy link

SpyrexDE commented Aug 1, 2023

I am currently building a TimeLine Block for primo. The first time I saved it nothing happened but from there on resaving gives me this error:
image

This is the block I was trying to edit:
TimeLine.json.zip

@mateomorris
Copy link
Collaborator

@SpyrexDE I'm assuming this is the newest version? I pushed a couple updates late last night - you should have seen a "database change required" notice

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 1, 2023

I just updated my fork. I got no notice like that and when I open my site I get the following error on the server, probably due to these database changes:

TypeError: Cannot read properties of null (reading 'map')
    at file:///var/task/.svelte-kit/output/server/entries/pages/_site_/_layout.svelte.js:560:32
    at Object.$$render (file:///var/task/.svelte-kit/output/server/chunks/index3.js:305:18)
    at Object.left (file:///var/task/.svelte-kit/output/server/entries/pages/_site_/_layout.svelte.js:673:121)
    at file:///var/task/.svelte-kit/output/server/entries/pages/_site_/_layout.svelte.js:330:78
    at Object.$$render (file:///var/task/.svelte-kit/output/server/chunks/index3.js:305:18)
    at file:///var/task/.svelte-kit/output/server/entries/pages/_site_/_layout.svelte.js:650:66
    at Object.$$render (file:///var/task/.svelte-kit/output/server/chunks/index3.js:305:18)
    at file:///var/task/.svelte-kit/output/server/entries/pages/_site_/_layout.svelte.js:740:210
    at Object.$$render (file:///var/task/.svelte-kit/output/server/chunks/index3.js:305:18)
    at Object.default (file:///var/task/.svelte-kit/output/server/chunks/internal.js:72:119)

What do I have to change about the database?

@mateomorris
Copy link
Collaborator

Just need to add a column to the 'symbols' table to enable rearranging blocks in the sidebar. Instructions are in the changelog: https://primocms.org/changelog

@mateomorris
Copy link
Collaborator

mateomorris commented Aug 1, 2023

Okay @SpyrexDE should be fixed now. When you update it should show you the notice with instructions for adding the column to Supabase.

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 1, 2023

Okay @SpyrexDE should be fixed now. When you update it should show you the notice with instructions for adding the column to Supabase.

That fixed it, thank you :)

@SpyrexDE SpyrexDE closed this as completed Aug 1, 2023
@mateomorris
Copy link
Collaborator

Great! Sure thing 😄

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 2, 2023

Sorry looks like for some reason the same bug came up again 😫

image

And this error as well:
image

Im using the newest version.

@SpyrexDE SpyrexDE reopened this Aug 2, 2023
@mateomorris
Copy link
Collaborator

mateomorris commented Aug 2, 2023

ah. Could you share the primo.json file from your site? It'll be in the site's repository. Also, what do you mean by "saving the site"?

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 2, 2023

Sorry I meant saving the block:
TimeLine.json.zip
It also seems to only happen with the timeline block. My other custom blocks have no issues saving.

@mateomorris
Copy link
Collaborator

@SpyrexDE looks like something happened to that block's content. When did you create it? This one should work:
TimeLine 2.json.zip

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 3, 2023

@mateomorris I created it on the same day I created this issue.
You mean the missing "en": {} may have caused the problem? It looks like readding it solved my problem for now but I wouldn't be surprised if it would come up again soon :/

@mateomorris
Copy link
Collaborator

@SpyrexDE yeah, but I discovered what was causing it & pushed an update last night: primocms/builder@3fec11c

When you create new symbols now it shouldn't have that issue

@SpyrexDE
Copy link
Author

SpyrexDE commented Aug 3, 2023

@mateomorris I updated my fork and worked on the block a few more hours and I never had the issue again. Seems to be fixed now :D

@mateomorris
Copy link
Collaborator

Okay great 👍

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