paragraphs_post_update_rebuild_parent_fields() currently throws

SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: character va
rying <> bigint > LINE 5: WHERE (((p.parent_id <> f.entity_id)) OR (p.parent_type <> '...

This issue seems to be common elsewhere, affecting views and others. Attached patch casts the comparisons to strings.

Comments

mrweiner created an issue. See original summary.

mrweiner’s picture

StatusFileSize
new669 bytes
mrweiner’s picture

Status: Active » Needs review
mrweiner’s picture

Priority: Normal » Major

Updating to major as the issue completely blocks the post_update hook from running on sites using postgres as their db backend.

Status: Needs review » Needs work

The last submitted patch, 2: cast-query-to-text-3081645-1.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

berdir’s picture

Now that we finally have a update path test, we see that it fails, but it also makes it visible that the patch fails on MySQL now.

We might need to have a db driver check and only use the CAST() if using postgresql. Might also help with performance on MySQL.

mrweiner’s picture

@Berdir What's the proper way to check the driver?

johnchque’s picture

Status: Needs work » Needs review
StatusFileSize
new1.08 KB
new1.01 KB

@mrweiner thank you so much for the fix!!! I believe this is how we check the db driver. Let's see.

berdir’s picture

Status: Needs review » Fixed

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.