[buddypress-trac] [BuddyPress] #4523: On submitting a new activity, I got error "There was a problem posting your update, please try again."
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Thu Sep 13 15:44:11 UTC 2012
#4523: On submitting a new activity, I got error "There was a problem posting your
update, please try again."
----------------------------------------+--------------------
Reporter: renp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 1.6.2
Component: Activity | Version: 1.6.1
Severity: major | Resolution:
Keywords: dev-feedback needs-testing |
----------------------------------------+--------------------
Changes (by boonebgorges):
* keywords: dev-feedback => dev-feedback needs-testing
* severity: critical => major
* milestone: Awaiting Review => 1.6.2
Comment:
renp - Thanks for the additional info.
I've confirmed the issue. renp, you must be running MySQL using sql_mode
TRADITIONAL or something like that, which means that what are normally
syntax warnings (which fail gracefully) become fatal errors. This isn't
the default setup, and I haven't heard this bug reported before, so I'm
going to reduce the severity a bit.
In any case, the problem is that we recently (r5955) converted the item_id
and secondary_item_id columns of the activity table to bigint(20). But we
didn't, at the same time, change the `$wpdb->prepare()` statement in
BP_Activity_Activity::get() to account for the fact that these values
should be integers rather than strings. As a result, NULL becomes `''`,
rather than `0`.
Changing those two `%s` to `%d` fixes the problem in my tests. Can another
dev have a look and let me know whether they foresee any complications
with this?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4523#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list