Problem/Motivation
I have some inline images uploaded directly in some CK Editor fields. And those images were not exported in the assets. So, accordingly the referenced images from CK editor are broken in the higher environment where I am trying to import the content .
EDIT: The image was inserted using contrib entity_embed module.
Steps to reproduce
1. Upload some image in your Body field (of any content type) in any node
2. Go to export page path of that particular node
3. Now, export it as either YML or export as zip. You will see that assets were not exported there.
4. Go to other higher enviornment where the content has to be imported and follow the import page link there.
5. Import your yml file there and node created as part of import will have image reference in body field which will ultimately be external link to source site.
Proposed resolution
I belief there are some of modules available in Drupal.org which can help import the referenced images as media . Let me search that.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 3403294_#2.patch | 8.25 KB | nikhil_dawar |
Issue fork single_content_sync-3403294
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
abrammHi Shikha_LNweb,
Can you please provide the example HTML content?
Comment #3
nginex commentedAs far as I know we support embedded media in ckeditor, so if it’s img tag then it’s not supported yet
Comment #4
shiks commented@abramm
Apologies for delays in response.
Example :
Comment #5
shiks commented@nginex
Yes, I am using img tag. Can you please confirm if there is some patch available or some plans to support the embedded img tag soon ?
Comment #6
abrammThis looks like you're using the entity_embed module; can you please confirm that?
Comment #7
shiks commentedyes, using entity_embed for other purposes. @abramm
Comment #8
abrammImages inserted via
entity_embedaren't supported right now. Theentity_embedis a third party contrib module which does inline images processing in its own way.This is not a bug, so I'm changing this to feature request; we might support this in future if someone would be interested in implementing it.
Comment #9
shiks commentedLet me put some time on it and try creating a patch for it . @abramm
Comment #10
abrammWe're not your personal developers army @Shikha_LNweb, I'd be happy to review the MR adding the feature you need if you'd submit one.
Comment #11
nikhil_dawar commentedI've completed the patch that enables the import/export of embedded images through SCS as per above-mentioned request.
Thank you
Comment #12
manpreet_singh commentedComment #13
abrammHi nikhil_dawar,
Thank you for the patch!
Can you please create the MR? We have some tests and automatic checks that I'd like to see before we move forward.
Also I can see you've commented out a part of code; we don't keep dead code in repository so let's remove it altogether.
Comment #14
abrammComment #16
nikhil_dawar commentedHi abramm, here I have removed the dead code from the patch
Comment #17
nikhil_dawar commented