You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use ENV vars rather than settings.php, Webcalendar will try to read from a table webcal_config, rather than launching the installer. When you launch http://localhost:8080/, you're presented with the following in your browser:
Error
Error executing query.
Table 'webcalendar_php8.webcal_config' doesn't exist
SELECT cal_value FROM webcal_config WHERE cal_setting = 'WEBCAL_PROGRAM_VERSION'
Because #475 has yet to be merged, this particular change cannot be tested stand alone. To test the failure (and fix...), you can use my branch max951_plus_compose_plus_try_catch_reverted, which merges max951's fixes with mine.
We can test it failing first using my remote and branch.
To replicate this, you'll notice that I'm using ENV vars rather than settings.php as WEBCALENDAR_USE_ENV is set to true in the compose file.
./docker/docker-compose-php8-dev.yml:45: # sees WEBCALENDAR_USE_ENV is set to true, it will use these env vars and ignore settings.php.
./docker/docker-compose-php8-dev.yml:50: - WEBCALENDAR_USE_ENV=true
./docker/docker-compose-php8-dev.yml:72: - WEBCALENDAR_USE_ENV=true
I've also commented out the part of the compose file that would install the required SQL (include/sql/tables-msql.sql). (This is a proposed change in #503)
Note: you'll have to make sure that your mysql docker volume created with docker-compose is removed -- which might mean cleaning up your stopped containers.
$ (ins)sahal@shakuntala[~/code/webcalendar]$ cat docker/docker-compose-php8-dev.yml
. . .
# install sql at start
# To test the installer's built-in installer, comment this out
# - type: bind
# source: ../install/sql/tables-mysql.sql
# target: /docker-entrypoint-initdb.d/tables-mysql.sql
Now, run docker-compose (or podman-compose as I am doing here):
(ins)sahal@shakuntala[~/code/webcalendar]$ podman-compose -f docker/docker-compose-php8-dev.yml up
Test Fix
Again, because #475 has yet to be merged, this particular change cannot be tested stand alone. To test the fix, you can use my branch max951_plus_compose_plus_try_catch, which merges max951's fixes with mine.
Note: you'll have to make sure that your mysql docker volume created with docker-compose is removed -- which might mean cleaning up your stopped containers.
(cmd)sahal@shakuntala[~/code/webcalendar-clean]$ podman-compose -f docker/docker-compose-php8-dev.yml up
Diff of the fix
I am not sure how you want to fix this. I am not a php developer. I noticed that you were using try/catch blocks elsewhere and this is what I did.
If you'd like, I can put this in a clean branch (without max951's proposed changes from #475, and sans my docker updates from #503 -- in case you chose not to accept them).
Debug backtrace for funsies
I also added the following to the top of the do_config function in includes/config.php for funsies.
If you use ENV vars rather than
settings.php
, Webcalendar will try to read from a tablewebcal_config
, rather than launching the installer. When you launch http://localhost:8080/, you're presented with the following in your browser:If you hit http://localhost:8080/install/ directly, however, you will be able to proceed with the install normally.
Test failure
Because #475 has yet to be merged, this particular change cannot be tested stand alone. To test the failure (and fix...), you can use my branch
max951_plus_compose_plus_try_catch_reverted
, which merges max951's fixes with mine.We can test it failing first using my remote and branch.
To replicate this, you'll notice that I'm using ENV vars rather than
settings.php
asWEBCALENDAR_USE_ENV
is set totrue
in the compose file.I've also commented out the part of the compose file that would install the required SQL (
include/sql/tables-msql.sql
). (This is a proposed change in #503)Note: you'll have to make sure that your mysql docker volume created with
docker-compose
is removed -- which might mean cleaning up your stopped containers.Now, run
docker-compose
(orpodman-compose
as I am doing here):Test Fix
Again, because #475 has yet to be merged, this particular change cannot be tested stand alone. To test the fix, you can use my branch
max951_plus_compose_plus_try_catch
, which merges max951's fixes with mine.We can test the fix using my remote and branch.
Note: you'll have to make sure that your mysql docker volume created with
docker-compose
is removed -- which might mean cleaning up your stopped containers.Diff of the fix
I am not sure how you want to fix this. I am not a php developer. I noticed that you were using try/catch blocks elsewhere and this is what I did.
If you'd like, I can put this in a clean branch (without max951's proposed changes from #475, and sans my docker updates from #503 -- in case you chose not to accept them).
Debug backtrace for funsies
I also added the following to the top of the
do_config
function inincludes/config.php
for funsies.Here's the resultant file: debug_backtrace_do_config.txt
The text was updated successfully, but these errors were encountered: