Closed (fixed)
Project:
Default Content Deploy
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2020 at 09:30 UTC
Updated:
2 Mar 2022 at 17:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
miroslav-leeCould you install the latest version of the module itself and test it again, please?
Comment #3
simoneb commentedTested with latest beta but I'm still getting same type of errors, type is random.
Type http://xxxx/rest/type/paragraph/text does not correspond to an entity on this site.
Type http://xxxx/rest/type/content_moderation_state does not correspond to an entity on this site.
Type http://xxxx/rest/type/paragraph/erl_section does not correspond to an entity on this site.
...
I'd to set time limit to 0 in default_content importer as the import works only for small files
Comment #4
simoneb commentedI get results like:
Created: 28
Updated: 2
Skipped: 0
Error message Type http://xxxx/rest/type/user/user does not correspond to an entity on this site.
Of course nothing is imported.
Same file, unzipped into content folder and imported with: dcdi --preserve-password --force-override
works
Comment #5
simoneb commentedLast test
I exported the site to local content folder using EXPORT SITE UI (about 500 nodes)
I tried to import them (no force override) and I got:
created: 0
updated: 1195
skipped: 988
with error Type http://192.168.0.18/rest/type/shortcut/default does not correspond to an entity on this site.
I'm not sure that it should have updated 1195 objects as there have been no changes between the two but... btw, it's not the focus of the issue
Tried to import via terminal with:
drush dcdi --preserve-passwordand I gotsame numbers before confirmation
- created: 0
- updated: 1195
- skipped: 988
and I was able to import (I had to remove the content_moderation_state folder due to the Error: Call to undefined method stdClass::save() in Drupal\content_moderation\Entity\ContentModerationState->save() issue)
In this case, I got: [OK] Content has been imported.
Comment #6
simoneb commentedDebugging a bit, the error is fired by this function
in web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php line 268
Comment #7
simoneb commentedOk, after a long debug I found the issue
in src/Importer.php is using getHttpHost that doesn't return the site path if it's installed in a subfolder (it's my case)
I've created a patch for it and seems working
Comment #8
simoneb commentedSomething is still wrong, on HTTPS it still does not work (probably because the schema is set to HTTP by default)
Also, if I try to import a simple Article with a Tag, both are created but not linked.
All these issues from the UI only, from command line all work perfectly
Comment #9
miroslav-leeThank you very much for this work, I will look at this patch later.
Comment #10
rakshith.thotada commentedI have provided with the patch with custom Normaliser for default content - that takes care of the above issue. Please review.
Comment #11
rakshith.thotada commentedUpdated The Patch with a fix for issue https://www.drupal.org/project/default_content_deploy/issues/3130782 as well
Comment #12
rakshith.thotada commentedComment #13
rakshith.thotada commentedUpdating the patch with recent changes related to issue https://www.drupal.org/project/default_content_deploy/issues/3130782
Comment #14
rakshith.thotada commentedPatch to integrate with Better Normalizer Module.
Comment #15
rakshith.thotada commentedI found the File entity Normalizer takes care of itself - we just need to decorate TypeLinkManager service to overcome the above issue.
Comment #16
rakshith.thotada commentedUpdated the patch to consider References for all entities.
Comment #17
rakshith.thotada commentedUpdating the Patch with Final fix.
Comment #18
rakshith.thotada commentedUpdated the patch to work with internal links.
Comment #19
miroslav-lee@simoneb Could you check the last patch from @rakshith.thotada, please?
Comment #20
miroslav-leeBut I think your patch do a global changes. I attached patch with small fixes.
Test please
Comment #21
axel80 commentedI tested patch #20, the issue is resolved and the content is imported successfully
Comment #23
miroslav-leeComment #25
priya sundharam commentedHi Team,
Do we have any patch for Drupal9 for the same issue as above patch is not compatible with D9?
Thanks
Comment #26
simoneb commentedAccording to this commit https://www.drupal.org/commitlog/commit/92827/1b6f020f7954d410dfbb78a6e2... it should have been ported to 2.0.x. Am I wrong?