-
Notifications
You must be signed in to change notification settings - Fork 470
Closed
Milestone
Description
Describe the bug
The upgrade from 2.x to 3.x does not modify the block context of custom blocks, leaving them orphaned if they existed in BLOCK_CONTEXT_RIGHT_SIDEBAR or BLOCK_CONTEXT_HOMEPAGE
To Reproduce
Steps to reproduce the behavior:
- Add custom blocks to a context other than the left sidebar in OJS 2.x
- Upgrade to OJS 3.1.2
- Navigate to Website Settings -> Appearance
- Custom blocks to not appear in the Sidebar or Unselected section of Sidebar Management.
What application are you using?
OJS 3.1.2
Additional information
Original contexts were:
pkp-lib/classes/plugins/BlockPlugin.inc.php
Lines 16 to 18 in 097e08e
| define('BLOCK_CONTEXT_LEFT_SIDEBAR', 0x00000001); | |
| define('BLOCK_CONTEXT_RIGHT_SIDEBAR', 0x00000002); | |
| define('BLOCK_CONTEXT_HOMEPAGE', 0x00000003); |
Contexts for 3.1.2 were:
pkp-lib/classes/plugins/BlockPlugin.inc.php
Lines 16 to 17 in 957d926
| define('BLOCK_CONTEXT_SIDEBAR', 0x00000001); | |
| define('BLOCK_CONTEXT_HOMEPAGE', 0x00000003); |
But, only
BLOCK_CONTEXT_SIDEBAR is considered:pkp-lib/controllers/listbuilder/settings/BlockPluginsListbuilderHandler.inc.php
Lines 89 to 91 in 957d926
| case BLOCK_CONTEXT_SIDEBAR: | |
| $sidebarBlockPlugins[$key] = $plugins[$key]; | |
| break; |
But then this constant is entirely removed in 3.2:
a76bac7#diff-70caff5ef9a513397af1833a3e2a3c7c
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done