Years ago I followed the instructions for including a prebuilt layout directory. Now I realize my custom layout doesn’t show up anymore. Nothing changed in my code, has something changed to stop this from loading?
Prebuilt layouts in directory not loading
This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.
Hi, thanks for getting in touch. I can ask our developer to take a look. Might it be possible to ZIP your theme or plugin and upload it to WeTransfer.com or Dropbox or similar and send us the link?
I can do that, I tried posting my code here but Cloudflare blocked my post. Would it be more convenient to give you an admin login to my site so the developer can look at the problem live on my server? Otherwise I can package the theme and send it.
Pastebin.com is another option. We can login and assist directly within our premium support scope.
Here is the theme I’m using: https://we.tl/t-ZfrWqlxTRk
I am using a child theme of it but there’s really no signficant modifications, just the example code from your post listed above.
Hi, thanks for the link. Is the layouts implementation contained in the WeTransfer download link? If not, it’s best we take a look at your implementation to confirm and help troubleshoot the issue. A working example can be found here https://github.com/siteorigin/siteorigin-corp/blob/develop/inc/siteorigin-panels.php.
No it is not contained in there because I use a child theme on top of that main theme, sorry. The only changes in my child there are some css and the implementation. Here is a pastebin documenting the implementation: https://pastebin.com/WF1wvAvL
Super, thanks for the detailed feedback. I’ve asked Alex here at SiteOrigin to take a look at the JSON formatting and anything else that may be an issue. We’ll reply as soon as possible.
Hi Tidalchiro,
I’ve investigated this issue, and I suspect this relates to the file not passing a mime check. After following your instructions, Visual Code Studio saved the prebuilt layout as
text/html
and that won’t pass the existing mime check. I’ve expanded the check to try to account for this. I’ve prepared a patched version of Page Builder for you to try to confirm if it helps you.Before proceeding, do a backup.
Navigate to PluginsInstalled Plugins and deactivate Page Builder by SiteOrigin, and then delete it. Scroll to the top of the page and click Add New, Upload Plugin. Upload siteorigin-panels.2.31.3-beta.zip and when prompted, activate it. Does the layout show up for you now?
Kind regards,
Alex
It worked! Thank you so much! One additional change I had to make was to revert the json file to an older version that removed the backslashes. I think it was caused by importing and exporting the json file multiple times. The new json file looks like this: https://pastebin.com/V8gEFyMb
I really appreciate this.
Hi Tidalchiro,
Thanks for trying. To confirm, did the patch work without making any additional changes on your end or was it only after you reverted to the old json file? The slashes are intentionally added in newer exports so they should be fine to be present.
Kind regards,
Alex
Hi, sorry for the delay. I just tried both, and the json file with the slashes does not work but the original does.
Hi,
Thanks for trying. Hm. Oh! There was an issue with the provided build. Please try the latest release version of Page Builder to see if that helps with the version with the slashes. If it doesn’t, can you please send me a copy of the file you’re using inside of a zip? This will allow me to test it exactly how it is for you – a Pastebin, uploading the file, etc, is likely to change how the file is formatted.
You can use a website like WeTransfer to upload the zip. Please reply with a link to the file.
Kind regards,
Alex
It looks like both versions work now!
Hi,
It’s great to hear that helped! :)
Please feel free to open a new thread if anything else comes up. Have a good one mate.
Kind regards,
Alex