destack icon indicating copy to clipboard operation
destack copied to clipboard

Built Pages Reset on Local

Open SpencerIsTheKey opened this issue 3 years ago • 5 comments

I've found that after deploying from local, the build page isn't loaded into the editor again. The editor is empty, and anything added will overwrite the previously rendered page, though if redeployed without adding anything to the editor there are no changes to the rendered page.

The code on the page is as described for a next.js project in the README.md:

import 'grapesjs/dist/css/grapes.min.css'
export { getStaticProps } from 'destack/build/server'
export { ContentProvider as default } from 'destack'

And pages/api/builder/handle.js has the code outlined in the README.md:

export { handleData as default, config } from 'destack/build/server'

Is this an intended function, or have I configured it wrong?

SpencerIsTheKey avatar May 27 '22 22:05 SpencerIsTheKey

@SpencerIsTheKey

The editor is empty, and anything added will overwrite the previously rendered page, though if redeployed without adding anything to the editor there are no changes to the rendered page.

Not sure if I understand correctly but it seems you are having issues deploying your page.

Can you provide a repo or a public url to look it up?

LiveDuo avatar Jun 02 '22 23:06 LiveDuo

@LiveDuo

You can see the repo here, or the deployed website here

As far as I can tell the issue isn't deploying, it's redeploying; the destack editor doesn't seem to be pulling in data about the pages from /data when trying to edit the pages

SpencerIsTheKey avatar Jun 17 '22 15:06 SpencerIsTheKey

@SpencerIsTheKey

I cloned your repository and in my machine everything works as expected.

Here's what I've done:

  1. Did npm run dev, clicked Builder Page 1 and made a change to the text that starts with Meggings portland fingerstache lyft. I can see the change is reflected in data/static/test.json which stores the data for that page.
  2. Then I ran npm run build and npm start and the changes are reflected in the newly created page on http://localhost:3000/static/test.

Maybe there is an issue with your deployment process?

LiveDuo avatar Jun 21 '22 10:06 LiveDuo

@LiveDuo After I do npm run dev and navigate to one of the builder pages, all I get is a blank page like so: image And anything I add to the blank page overwrites the previous content. I've cloned and installed this project onto a number of devices and found this to be the case with all machines I have tested. Maybe there's something wrong with the environments?

SpencerIsTheKey avatar Jun 22 '22 00:06 SpencerIsTheKey

@SpencerIsTheKey

There were two bugs that are now fixed with 0.12.0. One has to do with Windows and the other with some changes in React v18 (more info here https://github.com/LiveDuo/destack/issues/44#issuecomment-1161522931).

Let me know if this fixes it.

If your still having issues it would help to share more info about your setup such as the operating system and the Nodejs version your are using.

LiveDuo avatar Jul 03 '22 21:07 LiveDuo