super-table
super-table copied to clipboard
Can't install on Craft 4
Describe the bug
I am installing Super Table on a Craft 4 project (we're not ready for Craft 5 yet as it's too early in it's lifecycle), and it's impossible to install due to a paradoxical error:
You need to be on at least Super Table 2.7.1 before you can update to Super Table 3.0.0.
I am on Craft 4, so I am trying to install Super Table 3.0.0, but I can't install this until I've installed 2.7.1, which I can't do without being on Craft 3.
Steps to reproduce
- Set up a new Craft 4 project
- Try to install Super Table 3.0.0
Craft CMS version
4.9.4
Plugin version
3.0.0
Multi-site?
No
Additional context
No response
This error should only appear if you have some Super Table data in your database or in your project config files. It will never appear for a new, fresh install. Can you confirm if this is an upgrade, or it was upgraded at some point?
You need to be on the most recent Craft 3 release before upgrading to Craft 4. This error shows that there's some Super Table data, so it was or currently is installed, but at an older version.
I would suggest either removing the Super Table data before installing, or you can remove the row in the plugins database table.
Hi, circling back to this one nearly a year later as we ended up getting this all installed working fine.
However, the site is live and we're just running an update to the CMS for the first time and it's just thrown this again. But the thing that is really confusing me, is the CMS knows we're on Supertable 3.0.14, where the evidence is:
Inside the production CMS:
I have updated the CMS locally working absolutely fine, then pushing to production and running composer install we get:
You need to be on at least Super Table 2.7.1 before you can update to Super Table 3.0.15.
How can I finally get this problem resolved without having to wipe all our Super Table content from the DB?
Sounds like something is an issue with your project config for that project, and something wasn't applied properly.
I might suggest to "start again" by downloading your production database locally, then running ./craft project-config/rebuild which will rebuild your YAML files according to your production site.
Check what changes there are, but deploying that to production should been things are back in sync.
I downloaded the production DB, installed it locally, rand the project-config/rebuild command the added the changes to git then pushed this up. The developer handling the deployment (it's not me unfortunately) ran the following:
git pull
composer install
./craft clear-caches/all
Returns the following:
OK: You need to be on at least Super Table 2.7.1 before you can update to Super Table 3.0.15.
Right, so again as per my original post something hasn't been updated correctly on your production site. I note you said you managed to get things upgraded correctly, but this doesn't seem to be the case according to this error message you're getting on your production site.
You could throw caution to the wind and directly modify your plugins database table and change the version column to 3.0.15. But this error message is stating that this Craft install is still on the Craft 3 version of Super Table.
Out of interest, what are the row values in the plugins database table for super-table?
Hi mate, yeah, you're right. Doesn't look like it ever did get resolved. Sorry about this, I know it must be a frustrating one to debug. I appreciate your time and effort.
The plugins database table says:
id handle version schemaVersion installDate dateCreated dateUpdated uid
26 super-table 3.0.15 3.0.0 2024-05-24 10:14:32 2024-05-24 10:14:32 2025-01-13 11:45:23 13279f3b-ae42-4880-81f1-95fb2cbbe8e0
So everything appears fine there.
Okay, so the database is reporting the correct version, which is a good start. When you grabbed that database, rebuilt the project config locally, what's the version for that?
You can track down the schemaVersion via /config/project.project.yaml which is a good start to check that's all on-par with the database.
Otherwise, that error is pretty odd. The logic for this check is pretty straightforward, where $plugin->version is referencing a version number less than 2.7.1, which should be impossible given your 3.0.15 version in the database.
The schemaVersion in the project.yaml file is as follows:
super-table:
edition: standard
enabled: true
schemaVersion: 3.0.0
Hi @engram-design, so if the DB is saying it's on v3, and the schemaVersion is also 3. What other options could there be?
The deployment process is:
- Pull the latest code from the repo
- Run
composer install - Run
./craft clear-caches/all - Run
restart nginx
We're in a spot where we can't update the project until this error is resolved, so any help is appreciated.
Are you missing a ./craft project-config/apply step in there?
Hi @engram-design, right, I have worked with the developer in control of production land and he's resolved it. Something to do with how git was working on the production server so it wasn't actually pulling the latest files correctly.
This is the downside of not having access to the production environment myself, so apologise for wasting your time, but thanks for your efforts! Closing.