HansSchouten / PHPageBuilder

A drag and drop page builder to manage pages in any PHP project
https://www.phpagebuilder.com
MIT License
739 stars 180 forks source link

app.js:formatted:425 Uncaught TypeError: Cannot read property 'attributes' of undefined #43

Closed dsultanr closed 3 years ago

dsultanr commented 3 years ago

image

HansSchouten commented 3 years ago

When does this error exactly occur? I haven't seen this one yet, while using the package daily.

dsultanr commented 3 years ago

this happens when I do insert a very complex view.php block with many styles and scripts. It's a whole site's page actually but I want it to be a block

what is your advice on integrating such a blocks?

image

HansSchouten commented 3 years ago

I would create a layout file that contains all the meta, link and script tags (see this example). Next I would put the javascript inside a file called script.js in the folder of the block. Then you can create a page that uses your layout file and then drag the block of this entire page onto it.

dsultanr commented 3 years ago

create a page that uses your layout

what does it mean? create a block?

HansSchouten commented 3 years ago

No, it means to create a folder like this one: https://github.com/HansSchouten/PHPagebuilder-boilerplate/tree/master/themes/demo/layouts