- Issue created by @Grevil
- @grevil opened merge request.
- Status changed to Needs review
almost 2 years ago 9:01am 27 January 2023 - π©πͺGermany Grevil
Please review! The changes helped me to successfully migrate my site!
- π©πͺGermany Grevil
UPDATE: The problem might only appear, when migrating, and should be handled in this issue's related issue. Nonetheless, the empty check might still be a good idea to make sure we do not work with empty variables.
- last update
over 1 year ago 46 pass patch-4 only makes the error message not appear during the migration, but the data in the flag_counts table does not update. I've added a new patch which causes behavior when adding a new flag to the database, if there are no related records in the flag_counts table, such a related record will be created.
- π©πͺGermany Grevil
Sorry, the diff seems to be weirdly formatted... @svitlana.miko could you apply your changes to this issue's MR, for better reviewability?
- Issue was unassigned.
- π©πͺGermany Anybody Porta Westfalica
@svitlana.miko could you please incorporate your changes into the MR as @Grevil suggested? So we could finally review this and fix it?
- First commit to issue fork.
- Merge request !61Issue #3336839 by rollins: FlagCountManager: Call to a member function id() on null β (Open) created by rollins
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Open on Drupal.org βCore: 9.5.x + Environment: PHP 7.3 & MySQL 5.7last update
7 months ago Waiting for branch to pass - Status changed to Needs work
4 months ago 8:37am 4 July 2024 - πΉπThailand AlfTheCat
Not doing a migration, but getting this error in the log as well.
#11 failed for me, here is the terminal and .rej info:sudo -u www-data patch -p1 < 61.patch patching file src/FlagCountManager.php Hunk #1 FAILED at 196. 1 out of 1 hunk FAILED -- saving rejects to file src/FlagCountManager.php.rej
+ if ($existing_entity) { + $count = $existing_entity->count + 1; + + $this->connection->update('flag_counts') + ->fields(['count' => $count]) + ->condition('entity_type', $entity_type) + ->condition('entity_id', $entity_id) + ->execute(); + } else { + // Entity does not exist, so insert a new row + $this->connection->insert('flag_counts') + ->fields([ + 'flag_id' => $flag_id, + 'entity_type' => $entity_type, + 'entity_id' => $entity_id, + 'count' => 1 + ]) + ->execute(); + } + } } /**
Hope this helps.
- π¨π¦Canada floydm
@alfthecat the patch does not apply to beta 4 but it applies to the current dev branch fine.
- First commit to issue fork.
- π¨πSwitzerland exiled_hammer
Patch file for 8.x-4.0-beta5 from Merge request !61
- First commit to issue fork.