#9075 closed defect (bug) (fixed)
When first activating BuddyPress with 12.1.1, 12.0.0 deprecated functions are not loaded
Reported by: | imath | Owned by: | imath |
---|---|---|---|
Milestone: | 12.2.0 | Priority: | highest |
Severity: | major | Version: | 12.0.0 |
Component: | Core | Keywords: | has-patch has-unit-tests commit |
Cc: |
Description
If we forced 12.0.0 deprecated functions to be loaded on first install, we missed the fact, installing BuddyPress for the first time with 12.1.1 or another minor release from the 12.0.0 branch is not including these π±. This βsupport reply made me check & notice this.
Attachments (1)
Change History (17)
#2
@
9 months ago
- Priority changed from high to highest
- Severity changed from normal to major
The problem is more that $initial_version
is always a major release. So the $current_version should be used to find the corresponding major version.
Our logic for new installs was to avoid loading deprecated functions. We changed it for 12.0.0 because we rightly thought it will take more time for 3rd party plugins or themes developer to be ready for this huge release.
Unfortunately, we haven't thought about the case when BuddyPress is first installed with a minor release.
Reading latest support replies, it looks like it's also happening when upgrading from 12.0. I need to check if it's happening when BuddyPress was first installed with 12.0 in this case or with any previous releases.
This ticket was mentioned in βSlack in #buddypress by imath. βView the logs.
9 months ago
This ticket was mentioned in βPR #219 on βbuddypress/buddypress by β@imath.
9 months ago
#5
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
- On install, the initial version is always set to the closest major one, so there's no need to get it again as the
$first_major
variable. - Instead of comparing initial major version with the current version, we need to use the current major version so that minor releases also includes the right deprecated function files.
- Improve the unit test to include a check with a current minor version.
Trac ticket: βhttps://buddypress.trac.wordpress.org/ticket/9075
#6
@
9 months ago
I think it's fixing the issue. I'll package a 12.2.0-beta release so that it's easier to test upgrading from:
- 11.4.0
- 12.0.0
- 12.1.1
#7
@
9 months ago
- Keywords dev-feedback added
Hi @vapvarun @emaralive & @dcavins
I've just tested this fix thanks to the attached 12.2.0-beta version (which includes it) for the following cases:
- 11.4.0 is updated to 12.2.0-beta
- 12.0.0 is updated to 12.2.0-beta
- 12.1.1 is updated to 12.2.0-beta
- fresh install of BuddyPress with 12.2.0-beta.
/wp-content/plugins/buddypress/core/deprecated/12.0.php
file is always loaded and using a 12.0 deprecated function is displaying a deprecated notice.
I believe it's ok to commit it.
Just to be sure could you run the same tests and confirm it's the case for you too?
Thanks in advance.
#8
@
9 months ago
@imath - Tested 12.1.1 is updated to 12.2.0-beta and deprecated functions for 12 load.
Note: Previous state with 12.1.1 was that deprecated functions were not loading.
Tested fresh install of BuddyPress with 12.2.0-beta and:
- deprecated functions for 12 load
- receive Thank you for installing BuddyPress 12.0! notification in BuddyPress Settings
#9
@
9 months ago
Hi @emaralive Thanks a lot for your tests π The Admin notification happens because corresponding major version to 12.2 is 12, I think itβs a good thing as itβs a first install so the Admin needs to be aware that with 12.2 just like 12.0, if he activated 3rd party plugins not ready for BP Rewrites, then they need to get BP Classic.
#10
@
9 months ago
- Keywords commit added; needs-testing dev-feedback removed
I believe weβre ready to have this in! Iβll commit the fix shortly.
#11
@
9 months ago
@imath - Ran the tests prior to looking more closely at the latest change for PR 219 and although the tests had passed, I think we need to revisit how the function
bp_get_deprecated_functions_versions()
should behave. Meaning, the latest change appears to be fixing a symptom and not the root cause of which originated with version 11.0 (the not loading of deprecated functions when there is a fresh install). There was a fix for 12 beta to load the deprecated functions which again fixed a symptom and not the root cause, which is why 12.1.1 failed to load the deprecated functions.
IOW, we need a real fix for what I guess will be 12.3.0, which will give us time to reexamine the aforementioned function.
#12
@
9 months ago
@emaralive sure, we can always improve it maybe in 14.0.0 as it will be another scenario.
As the fix is ok for 12.x.0 minor versions, Iβll use it to quickly build 12.2.0.
Once fixed for branch 12.0, Iβll reopen the ticket for 14.0.0.
#15
@
9 months ago
- Owner set to imath
- Resolution set to fixed
- Status changed from new to closed
In 13706:
can be improved with updating bp_get_deprecated_functions_versions()
or like this
If BP_LOAD_DEPRECATED is not set or set to false, the function returns only the latest version's deprecated functions, which aligns with the original logic for a first-time install.