You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing 'media' type via CSV using console command resulted in incomplete data.
Description
path column in bitbag_cms_media table was not set.
link column in bitbag_cms_media table was not set.
bitbag_cms_media_channels table was empty.
bitbag_cms_media_sections table was set, but when deleting records from bitbag_cms_media on database level, the delete operation was not cascading to bitbag_cms_media_sections.
As for problem 4, I saw from the entity's doctrine orm settings src/Resources/config/doctrine/Media.orm.yml that onDelete: CASCADE was set for the section side of the many-to-many relation only. Is there any reason it is not set for the block side of the relation?
manyToMany:
sections:
targetEntity: BitBag\SyliusCmsPlugin\Entity\SectionInterface
joinTable:
name: bitbag_cms_media_sections
joinColumns:
media_id:
referencedColumnName: id
inverseJoinColumns:
section_id:
referencedColumnName: id
onDelete: CASCADE
The text was updated successfully, but these errors were encountered:
tybw
changed the title
Incomplete importing 'media' type via CSV
Incomplete CSV import for type 'media'
Feb 28, 2019
Summary
Importing 'media' type via CSV using console command resulted in incomplete data.
Description
path
column inbitbag_cms_media
table was not set.link
column inbitbag_cms_media
table was not set.bitbag_cms_media_channels
table was empty.bitbag_cms_media_sections
table was set, but when deleting records frombitbag_cms_media
on database level, the delete operation was not cascading tobitbag_cms_media_sections
.Version
Sylius version: 1.4.0
Bitbab SyliusCmsPlugin version: 2.3.0
Details
The command used:
The CSV file header is as follows:
Leaving the column
image
blank or skipping the whole column from the CSV file won't help because exception occurs:Solutions and Questions
I managed to fix problem 1, 2 and 3 with some quick fixes to
src/Importer/MediaImporter.php
.Is there any reason against these fixes?
As for problem 4, I saw from the entity's doctrine orm settings
src/Resources/config/doctrine/Media.orm.yml
thatonDelete: CASCADE
was set for the section side of the many-to-many relation only. Is there any reason it is not set for the block side of the relation?The text was updated successfully, but these errors were encountered: