Using a site with SQLite integration as blueprint does not work

Bug Summary

Using a blueprint which uses SQLite integration as database, does not work and throws an 502 error.

Summarize the issue in one to two sentences.

Steps to reproduce

Create a simple blueprint (just add SQLite integration as plugin and activate it)
Create a new site from that blueprint, giving it a new domain name (e.g. test.local)
Does not work for me (MacOS 14.3.1)

As precisely as you can, list the steps it takes to reliably reproduce the issue.

same as above - there’s not more to add

Environment Info

Describe your environment.

  • What Operating System are you using?
    MacOS 14.3.1

  • What versions of site software (Nginx, Apache, PHP, MySQL) is used?
    Default settings as of Local Version 8.2.1+6583

  • What version of Local is installed?
    Version 8.2.1+6583

Supporting info

Please provide your Local Log. See this Community Forum post for instructions on how to do so:

local-lightning.log (40.9 KB)

Hi @tiptronic

What SQLite plugin are you using?

Do all things work normally on the site before you create the Blueprint?

When you try to spin up the Blueprint are you just getting a 502 when accessing the front end, back end or both? If you Open Site Shell and check your plugins is it still installed and activated?

Hi @Nick-B
thx for your reply.

I’m using the ‘official’ SQLite Integration plugin provided by the WP-Team.

The source-site works fine (it doesn’t do anything - I just added the SQLite Integration plugin)

The source-site is on local SSL.

It seems when the site is cloned, Local sets the site’s url from https to http, which might be the reason for a 502…

I tried manually fixing the url in the database (because in the original MariaDB there was still the http). But that didn’t help.

What I saw is, the db.php still contains the file-path to the original blueprint in sqlite_plugin_implementation_folder_path.

Same is true for the content of the SQLite database wp_options > siteurl, which might explain the problem.

I can’t check what happens if I modify these values, but will try asap.

Maybe you can try yourself in the meantime?

Best

andy

502 Error:

The page you requested generated a server error and could not be processed.
If you continue to get this message after refreshing, try restarting the Local site.

If the error persists, check the Local Router Logs in Local by going to
Help » Reveal Local Router’s Logs.

Hi @tiptronic

Could you share your full log file with us here? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.

Hi @Nick-B,

attached you’ll find the logs - but you likely find out they are pretty useless for this problem.

But today I found some time to investigate a bit further and finally I think I found out what the problem really is.
This might help to save you some time for troubleshooting, as it fixed the problem for me reliably:

Here’s what I did:

Step 1

The site runs fine both admin and front-end, pages, menus, post and images are there, local SSL is working.

The I stopped the site and kept it as blueprint ‘sqlite-integration.local’.

Step 2

Now I created a new site and used the sqlite-integration.local site as blueprint, which worked fine without any error.
When trying to run the site, I get some odd front-end problems and the 502 error when trying to access the backend.

…It seems the adjustments for SQLite were not updated, so I tried that manually:

Looking at the ‘db.php’ (of the freshly created site’s ‘wp-content’ folder):

  • I had to change this path (that’s the one from the blueprint):
    $sqlite_plugin_implementation_folder_path = ‘/Users/andy/Local Sites/sqlite-integration/app/public/wp-content/plugins/sqlite-database-integration’;

to this: (that’s the cloned path):

$sqlite_plugin_implementation_folder_path = ‘/Users/andy/Local Sites/sqliteblueprint/app/public/wp-content/plugins/sqlite-database-integration’;

  • Then I opended the cloned SQLite database in ./wp-content/database/.ht.sqlite
    and changed:
    wp_options > site_url
    wp_options > home

to ‘https://sqliteblueprint.local

  • Then I looked at my SQLite database-client (without doing anything)…
  • after a while Local replaces the ‘wp_options’ with the outdated ones (which I just replaced - except the one in ‘db.php’).
  • That made me think, it is looking at the (now unused) MariaDB/mySQL to read those values from there.

Since I had no access to the WP-Admin (because of the 502 error), I accessed the mySQL database using TablePlus and changed (again):

wp_options > site_url
wp_options > home

to ‘https://sqliteblueprint.local

in the mySQL-database

AND - of course - in the .ht.sqlite (again).

That made things work (except the SSL certificate and assets).

local-logs.zip (146 KB)

1 Like

Thank you for the thorough details here for us and others to find @tiptronic! Glad you were able to get this going.

Bug Summary

Sorry to create a new topic, but the other one was closed, without any statement what’s next:

Is this bug going to be accepted and fixed at some point, or do I need to write some code to fix it myself?

thx
andy

Hi @tiptronic - Apologies I didn’t mean to close down your original bug and I’ve reopened it here. I’ve passed this along to our dev team to look into. We don’t have any kind of ETA to provide on when or if this might be addressed but we will leave your bug open here for others to vote and comment on which we will track to gauge impact.

Hi @Nick-B,

thanks for the clarification- this is much appreciated.

Best

andy

1 Like