Skip to content

Commit

Permalink
FIX missing cake_sessions table on new install
Browse files Browse the repository at this point in the history
The cake_sessions table is used by the worker, on a fresh install, the
worker will crash due to it missing. I've added it to the database
create sql to fix this. Originally, it was meant to be created by
app/config/bootstrap.php as a sign of successful install, but the worker
gets up and running before that gets to run.

Fix a '>' appearing at the top of the page if no Google analytics is
confirmed. This is an extra > in the Google analytics script block.

DJJob was still being pulled in by git submodule, looking at the
submodules, we don't use most of it anymore, so I added a manual clone
to the Dockerfile to pull it in.
  • Loading branch information
ionparticle committed Feb 7, 2025
1 parent a1db12b commit 9750280
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ COPY . /var/www/html
COPY docker/docker-entrypoint-php-fpm.sh /

RUN cd /var/www/html \
&& git clone https://github.com/seatgeek/djjob.git app/plugins/djjob/vendors \
&& composer install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --optimize-autoloader \
&& mkdir -p /var/www/html/app/tmp/cache/persistent /var/www/html/app/tmp/cache/models /var/www/html/app/tmp/logs \
&& chown www-data:www-data -R /var/www/html/app/tmp/cache \
Expand Down
8 changes: 8 additions & 0 deletions app/config/sql/ipeer.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1635,3 +1635,11 @@ CREATE TABLE IF NOT EXISTS `jobs` (
) ENGINE = InnoDB DEFAULT CHARSET=utf8;

SET foreign_key_checks = 1;

-- --------------------------------------------------------

CREATE TABLE IF NOT EXISTS `cake_sessions` (
`id` varchar(255) NOT NULL,
`data` text DEFAULT NULL,
`expires` int(11) DEFAULT NULL, PRIMARY KEY (`id`)
);
8 changes: 7 additions & 1 deletion app/config/sql/ipeer_samples_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2394,4 +2394,10 @@ CREATE TABLE IF NOT EXISTS `jobs` (

-- store course term
ALTER TABLE `courses` ADD COLUMN `term` VARCHAR(50) NULL DEFAULT NULL;
--- END: Added by DB upgrade to version 17
-- END: Added by DB upgrade to version 17

CREATE TABLE IF NOT EXISTS `cake_sessions` (
`id` varchar(255) NOT NULL,
`data` text DEFAULT NULL,
`expires` int(11) DEFAULT NULL, PRIMARY KEY (`id`)
);
2 changes: 1 addition & 1 deletion app/views/layouts/default.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
gtag('js', new Date());

gtag('config', '<?php echo $trackingId['SysParameter']['parameter_value']; ?>');
</script>>
</script>
<?php endif; ?>
</head>
<body>
Expand Down

0 comments on commit 9750280

Please sign in to comment.