HansSchouten / Laravel-Pagebuilder

A drag and drop pagebuilder to manage pages in any Laravel project
https://www.phpagebuilder.com
MIT License
783 stars 182 forks source link

SQLSTATE[42000]: Syntax error or access violation: 1064 #12

Closed Dontorpedo closed 4 years ago

Dontorpedo commented 4 years ago

full Error:

PDOException SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= '1'' at line 1 http://mydomain/admin/pages/1/build

I have used #8 issuecomment-625410309 to add your pagebuilder into my exististing app,

added created a page (filled only name, didn't know if data and layout should be filled)

i created than the button for the building route

http://mydomain/admin/pages/1/build

but then the error appears, what can i do about it?

thanks Denis

HansSchouten commented 4 years ago

Layout should be the folder name of the layout that you use. By default it should be master. When does the error appear? Is it when you create a page or when you go to the build URL?

Dontorpedo commented 4 years ago

it appears when i go to the build url.

HansSchouten commented 4 years ago

Is the page layout now set to master, do you have theme files and are you sure you have the latest config.php? Your config should be similar to: https://github.com/HansSchouten/Laravel-Pagebuilder/blob/master/config/pagebuilder.php.

The query syntax '= '1'' does not contain any information on what goes wrong. It is just contains the id of the page and that should exist. Maybe try further debugging it by adding some dd() in PHPageBuilder\Modules\GrapesJS\PageBuilder method renderPageBuilder().

Dontorpedo commented 4 years ago

yes i have set the layout to master, the themfiles are in the /themes folder in the root of the project.

ok, i have updated the config file, the outcome changed somehow..

now i have a white page, no further error, also nothing in logfile :(

HansSchouten commented 4 years ago

Do you see the loading animation? Then maybe check your browser console for JavaScript errors or inspect the page source for PHP errors that are not displayed.

Dontorpedo commented 4 years ago

ha, was on wrong url.. now it works.. thank your very much!

what should i see on the builderpage? at the moment i see only this

https://share.getcloudapp.com/OAuBq6LP

Dontorpedo commented 4 years ago

oh ok, in the demo is only a header, thought there are more blocks, nice package, have to play around with it. thank you for your great support!