Cms: No site settings exist for section 5

Created on 16 Jan 2019  Â·  12Comments  Â·  Source: craftcms/cms

Description

After updating from 3.0.37 > 3.1.0 try to update Section getting error:

No site settings exist for section 5

see screenshot

Steps to reproduce

  1. Update 3.0.37 > 3.1.0
  2. Create or update existing sectio

Additional info

  • Craft version: 3.0.37 > 3.1.0
  • PHP version: 7.2.10-0ubuntu0.18.04.1
  • Database driver & version: Mysql 8.0.13
  • Plugins & versions:

Most helpful comment

Running the new ./craft project-config/rebuild command added in Craft 3.1.20 fixed this for @helvetication

All 12 comments

UPDATE:
It fixed somehow, but now another error
Undefined index: siteSettings

see screenshot

Can you please send a database backup (from before the 3.1 update, if possible) along with your composer.json and composer.lock files over to [email protected] ?

Craft may have automatically created a backup for you and saved it to storage/backups/.

I am coming up with the same issue — trying to add a field to a section in 3.1.6.1. Part of this may be that, not thinking, I am trying to do this in production although this site is now set to use Project Config (so I should probably now be doing all this on local/dev, and then promoting the Project Config YAML).

@brandonkelly - do you still need a DB backup, or would the stack trace help?

@mildlygeeky have you made any other changes in production in the past, after moving to project.yaml? Doing that is very risky because it’s easy to accidentally override project.yaml changes on future deployments.

If you can contact us from your Craft Support widget and reference this issue, we’ll have everything we need to look into it.

@brandonkelly tried to submit over the support widget, but got this impressive error:

screen shot 2019-01-30 at 9 18 36 pm

Full message was:

Server error:POST https://support.pixelandtonic.com/api/index.php resulted in a 500 Internal Server Error response

Sent properly the next time (skipped attaching an extra DB backup), but may want to try to see what caused that error, and why each letter was bulleted.

@nchorniiNetls are you still experiencing this? @mildlygeeky issue was resolved by deleting the project.yaml file and allowing Craft to regenerate that.

What was the resolution to the original question? Why was the issue closed?

I'm having the same issue when saving a section's entry type in Craft 3.1.19: Undefined index: siteSettings both in the dashboard and through a migration.

Update: I got a migration to run successfully by getting the section's site settings and just assigning to a variable, like:
$siteSettings = $section->getSiteSettings();

However, I'm still unable to save the section's entry type via the dashboard.

@helvetication Can you get in touch over [email protected]? It would be awesome if you could provide a DB backup, your composer.json and composer.lock files.

If you have useProjectConfigFile set to true, please provide the project.yaml file as well!

Running the new ./craft project-config/rebuild command added in Craft 3.1.20 fixed this for @helvetication

I love it!

Running the new ./craft project-config/rebuild command added in Craft 3.1.20 fixed this for @helvetication

This worked for me too. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitboxfw picture bitboxfw  Â·  3Comments

angrybrad picture angrybrad  Â·  3Comments

timkelty picture timkelty  Â·  3Comments

rynpsc picture rynpsc  Â·  3Comments

leigeber picture leigeber  Â·  3Comments