craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.25k stars 630 forks source link

Project config sync not applying single's changed template path #6299

Open olets opened 4 years ago

olets commented 4 years ago

Description

A change to a single section's template path setting isn't applied by project config sync. The specific change I noticed this with was adding an underscore prefix to the path.

Steps to reproduce

  1. In one environment, change a single's template setting from "my-section/_entry" to "_my-section/entry" (or probably any other change, the prefix change is what I was doing when I hit this bug.
  2. Push the change up to a remote environment
  3. See that the project config file on the remote environment has the updated template path
  4. Run project config sync on the remote environment
  5. See that the section's template has not changed on the remote environment

Additional info

I'm not on the latest version. Not seeing anything about this in later versions' changelog notes. There's a lot going on with this particular site I'm holding off on upgrading for the moment, but can if you expect that'll address the problem.

I have not run sync with --force yet in case there's anything I can do first to help diagnose the problem.

Possibly this is #6160?

Advanced Url Field 1.0.0
Amazon S3 1.2.8
Analytics 4.0.10
Asset Rev 6.0.2
Control Panel Nav 3.0.12
Cookies 1.1.12
CP Field Inspect 1.1.3
Element Map 1.2.1
Embedded Assets 2.2.4
Entry Instructions 1.0.7
Environment Label 3.2.0
Expanded Singles 1.1.2
Field Manager 2.1.6
Flat Categories 2.0.0
Image Resizer 2.0.8
Inventory 2.1.0
Matrix Colors 2.0.1
Password Protect 1.0.0
Redactor 2.6.1
Redirect plugin for Craft 3 1.0.23
SuperSort 3.0.1
Super Table 2.4.9
Twig Perversion 2.1.0
Video Embed 1.2.1
brandonkelly commented 4 years ago

Just tried this locally and wasn’t able to reproduce. Not really sure why it wouldn’t have been picked up… were there any other project config changes deployed at the same time? Did they get synced properly?

olets commented 4 years ago

Hm thanks for trying. Yes there were other project config changes in the same same sync (none related to that section, if that matters) and they all synced fine.

Tried using --force, that fixed it. But I don't fully understand what risks might come with forcing, doesn't feel like a production solution.

Was able to reproduce it on my end. Possible it's something about my setup, but the sync command did say it succeeded. I'll keep experimenting

brandonkelly commented 4 years ago

--force tells Craft to re-sync everything in project.yaml – not only the things that look like they changed.