Matrix Field won't save anything.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
I have a matrix field used for different content options such as a Text block or Image block, but none of the data selected or inputted will save. It just empties the field out.
Here is the POST REQUEST in the logs:
$_POST = [
'elementType' => 'craft\elements\Entry'
'elementId' => '27'
'siteId' => '1'
'seoHandle' => 'seo'
'typeId' => '1'
'CRAFT_CSRF_TOKEN' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
'redirect' => '1f4cc916263f5567dee497d72e0565624355761e99d19fdb2a5acf641242f115entries/pages'
'sectionId' => '1'
'entryId' => '27'
'title' => 'About'
'fields' => [
'heading' => 'About The Ford Language Institute'
'subHeading' => ''
'pageContent' => [
'new1' => [
'type' => 'textBlock'
'enabled' => '1'
'fields' => [
'text' => ''
]
]
]
'seo' => [
'titleRaw' => [
1 => 'About'
]
'description' => ''
'keywords' => '[]'
'score' => ''
'social' => [
'twitter' => [
'image' => ''
'title' => 'About - Speechkey'
'description' => ''
]
'facebook' => [
'image' => ''
'title' => 'About - Speechkey'
'description' => ''
]
]
'advanced' => [
'robots' => [
0 => ''
]
'canonical' => ''
]
]
]
'slug' => 'about'
'parentId' => ''
'author' => [
0 => '1'
]
'postDate' => [
'date' => '5/5/2019'
'timezone' => 'America/Los_Angeles'
'time' => '12:33 AM'
]
'expiryDate' => [
'date' => ''
'timezone' => 'America/Los_Angeles'
'time' => ''
]
'enabled' => '1'
'revisionNotes' => ''
]
Additional info
- Craft version: 3.1.25
- PHP version: 7.1.12
- Database driver & version:
- Plugins & versions:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Matrix field save using the submitted POST data and Craft 3.1.25, focusing on the pageContent block and its empty text value. Compare the submitted matrix data with the persisted entry; done means the selected and entered Matrix content remains after saving.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100