Comments (5)
Hi, thanks for reaching out! Could you please post the full stack trace for this error?
from cms.
In admin page, I access a structure entry with this error: https://cldup.com/n20M4rtNN9.png
View the entry with this error: https://cldup.com/7gO0jMSBU7.png
from cms.
Thanks! I can’t seem to replicate this issue. Any chance you could send your composer.json
, composer.lock
and database export to [email protected] and point out the entry that is giving you this error?
from cms.
Thanks for your info. I think if there is something wrong due to the changing the field type (table to plain text). The entry is saved the table data of the previous field type while the field type is plain text. In database table element_sites > content of all entries, the data of table field is still existing, for example.
{"col1":"Original title","col2":"Abc title"},{"col1":"Alternative title","col2":"XYZ title"}
Anyway, I deleted those entries. Do you think if the issue is due to changing the type of field and the old data exists in the element_sites > content?
from cms.
Thanks for providing more info!
due to the changing the field type (table to plain text)
With that missing piece of information, I can replicate it straight away.
When you change the type of the field, Craft doesn’t alter your data in the database. In Craft 4, changing a Field Type could lead to a database column that stored this data to be altered, therefore leading to data loss. In Craft 5, content is stored in a json column, but data incompatibility can still occur. There’s a warning under the Field Type dropdown about potential data loss and the types that should be safe to switch to don’t have the warning icon next to them.
You can still change the Field Type to one with a warning, but issues like this can occur. You can use the resave command to fix this. You can use it to clear out the field value or change it to something else. For example, php craft resave/entries --section blog --type article --set table --to "=" --if-empty 0
will clear out the value of a field with a handle table
for a section blog
and entry type article
.
I hope this helps!
I will close this now, but feel free to reach out if you run into any more problems.
from cms.
Related Issues (20)
- [4.x]: Migration throws error relating to UserGroupEvent when removing a user group HOT 5
- [4.x]: Links in release note alerts not rendered HOT 1
- [5.x]: Migration `m230511_215903_content_refactor` fails HOT 3
- Revisions for singles - Remove other sites from the author view (multisite) HOT 6
- [4.x]: error: Undefined array key "label" HOT 1
- Response Headers Ignoring Header Tags [4.x]: HOT 6
- [5.x]: Pagination info on overview page not updating after bulk editing with filter applied HOT 2
- [5.x]: Setting field values in Entry::EVENT_BEFORE_SAVE doesn't work when $firstSave is true
- [5.x]: Custom field conditions in element queries are case-sensitive now
- [5.x]: Incorrect CP console request URLs HOT 1
- [5.x]: Matrix blocks can't be reordered HOT 1
- [5.x]: web-auth/webauthn-lib 4.8.x has security advisory, conflicts with roave/security-advisories
- [5.x]: Entry types that were converted from Matrix block types should have the slug hidden by default HOT 1
- [5.x]: files being deleted from volume upon interaction before completion of image transforms
- [5.x]: Table entries cannot be drag/dropped to re-order on touch devices
- [5.x]: Assets UI Blank Headings Created when Temporary Uploads is Disabled HOT 4
- [5.x]: no option to change element index view on mobile and export button missing HOT 1
- [4.x]: `Element:: EVENT_DEFINE_SIDEBAR_HTML ` not working for `User` elements
- [5.x]: Exporting entries from element index table only exports the first page HOT 1
- [5.x]: Section - Previewlink URL not taking .env parameter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cms.