craftcms / craftcms/cms

Rebuild isn't re-generating 'boolean' values + After rebuild CP thinks config has changed

Open
#6,979 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

Description

When changing the 'non breaking space' setting on a Redactor field the config file for the field gets updated to set removeNbsp to '1'. But also there were some fields that were set to true before and are now changed to '1' after saving the field.

rebuild doesn't rebuild 'boolean' values
I was surprised obviously boolean values are changed into numberical string values, but you obviously did it for some reason, so I wanted to update all values in the config and so triggered a Rebuild in the project config menu. But to my surprise this didn't rebuild the other values.

So my questions are:

  1. Shouldn't Rebuild change these boolean values to the new numerical string values?
  2. Also because I don't really get the reason for this change; What about the old values (true/false) in config files? Do they still work? Are they deprecated? Should we convert them to the new syntax? (and if so; how to do this without doing everything by hand?)

after rebuild the same CP as used for rebuilding now sees pending changes from the config
After a Rebuild by the project config tool, for some weird reason now CP thinks there are pending changes from the new config files. That's pretty weird to me as it should contain no changes as it was rebuilt from the database in the first place.
image

Looking at the changes only the "IDs" and modify dates have changed, so this doesn't feel right to me as these are changed by the Rebuild tool, so should/could already be 'known' in the database I would think:
image

Steps to reproduce

see above

Additional info
  • Craft version: 3.5.12.1
  • PHP version: 7.4.9
  • Database driver & version: MySQL 5.5.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the project config menu's Rebuild flow and compare generated config values with database state, focusing on Redactor's removeNbsp and boolean serialization. Reproduce on the stated Craft, PHP, and MySQL versions, then verify whether rebuild normalizes booleans and whether the Control Panel reports pending changes when only IDs and modified dates changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, php
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.