Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'access' at row 1:
XmlSitemapLinkStorage::create()
When access is not granted (example: user profile view for Anonymous user), the xmlsitemap access is not checked correctly for integer values and entity save will crash.
Also I removed the unnecessary variables $url and $uri
The integer problem is with "status" to, in some cases. So I moved to must check section of the code.
Example: Check user entity at settings and save (but not configure), in this case the user entity is "Excluded" by default and the status is blank. So when type is Excluded status is NULL and save will crash.
patch attached for fix
Comment | File | Size | Author |
---|---|---|---|
#8 | 2674764-8.patch | 1023 bytes | amateescu |
#2 | entity_save_bug-2674764-1.patch | 1.54 KB | balintcsaba |
Comments
Comment #2
balintcsaba CreditAttribution: balintcsaba at REEA commentedComment #3
balintcsaba CreditAttribution: balintcsaba at REEA commentedComment #6
balintcsaba CreditAttribution: balintcsaba at REEA commentedSince the module test is incorrect I think that the patch is ok so back to needs review aggain.
Comment #7
juampynr CreditAttribution: juampynr at Lullabot commentedWe merged in a bunch of work from @amateescu into the module. Can you re-test please?
Comment #8
amateescu CreditAttribution: amateescu for Chapter Three commentedI couldn't get into the situation described in the issue summary, but this can be easily fixed with a simple type cast.
Comment #10
amateescu CreditAttribution: amateescu for Chapter Three commentedCommitted and pushed to 8.x-1.x. Thanks!