Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to sync a taxonomy, the "changed" date comes in as a timestamp which causes an error when converting using DateTime::createFromFormat:
ResponseText: Error: Call to a member function getTimestamp() on boolean in Drupal\entity_share_client\Service\JsonapiHelper->importEntityListData() (line 411 of /app/web/modules/contrib/entity_share/modules/entity_share_client/src/Service/JsonapiHelper.php).
entity_share version 8.x-2.x-dev
jsonapi version 8.x-2.0-rc1
Comment | File | Size | Author |
---|---|---|---|
#7 | entity-share-changed.patch | 826 bytes | mr.baileys |
#3 | 3013708-entity_share-timestamp-3-composite.patch | 1.5 KB | natanmoraes |
#2 | 3013708-entity_share-timestamp-1.patch | 1.47 KB | natanmoraes |
Comments
Comment #2
natanmoraesComment #3
natanmoraesRerolled the patch after having the one from this issue (I need both applied): https://www.drupal.org/project/entity_share/issues/3004186
Comment #4
GrimreaperHello,
Sorry for the delay and thank you for the patch.
The branch 8.x-2.x is highly unstable. And the priority issue is #2939827: Provide a supported API for entity denormalization.
Postponing this issue until the other one is done.
Comment #5
GrimreaperHello,
Do you still have the problem on Drupal 8.7.1 and entity share 8.x-2.0-alpha1?
I have make a basic test with taxonomy terms it works for me.
Comment #6
GrimreaperClosing the issue. If there is still the problem, please re-open with details in the comment.
Comment #7
mr.baileysTentatively re-opening, as I'm having the same issue although not with taxonomy terms. Drupal 8.7.6, Entity Share 8.x-2.0-alpha2:
Error: Call to a member function getTimestamp() on boolean in Drupal\entity_share_client\Service\JsonapiHelper->getStatusInfo() (line 725 of /var/www/html/web/modules/contrib/entity_share/modules/entity_share_client/src/Service/JsonapiHelper.php).
Entity Share Client is trying to convert the entity changed date from RFC3339 to a unix timestamp. However, the changed data passed by JSON:API already *is* a unix timestamp, so the conversion fails. I'm not sure why this line was added in #3044732: Compatibility with JSONAPI 2.x / Core 8.7.x?
Comment #8
Grimreaper@mr.baileys: please continue discussion in #3059358: Error after selection of a channel I think it is the same issue.