Problem/Motivation
Maybe I did something wrong but I can't pull my content on the client website. I am using Unami to try the module. When submitting the pulling form, it just display it again without any message.
I have a warning:
Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple()
It seems that the prepareImport function is returning always FALSE blocking the synchronization. My import_config_id is NULL. Is it mandatory to create a config synchronization or is it a bug that you can't synchronize anything? The config seems not documented: https://www.drupal.org/docs/8/modules/entity-share/installation-and-conf...
Did I miss something?
Steps to reproduce
- Install two Unami websites
- Enable entity_share and setup a server and a client
- Create a channel on the server to synchronize receipe
- Delete all receipes on the client and setup the server as the website that synchronized
- Go to /admin/content/entity_share, and try to synchronize one node, it will just submit and display the same page without any error message and the content is not synchronized
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#8 | entity_share-message_no_import_config-3177837-8.patch | 2.73 KB | Grimreaper |
#4 | entity_share-add_warning-3177837-4.patch | 812 bytes | phjou |
#2 | Screenshot_2020-10-19 Pull entities Entity share client.png | 50.22 KB | phjou |
Comments
Comment #2
phjouComment #3
phjouOk I just figured out that you have to create a configuration for the import.
It would be nice to add a step in the documentation and maybe also a message in the code in order to understand what is happening.
Comment #4
phjouComment #5
phjouJust wrote a patch to give some information to the user in order to know why it is not working and not have to look through the code in order to understand.
Comment #6
phjouJust updated the documentation. Feel free to revert if my change is not ok: https://www.drupal.org/docs/contributed-modules/entity-share/installatio...
Comment #7
GrimreaperHello,
Thanks for updating the documentation page, this is ok.
I will upload a new version of your patch because it acts too late in my opinion.
Comment #8
GrimreaperComment #10
GrimreaperHello,
No reply in 2 months. Merging.
I made a slight change compared to patch in comment 8. It is to avoid trying to load the import config if the import config ID NULL.