User tests: Successful: Unsuccessful:
Fixes PHP warnings caused by accessing properties on a null article item
when opening the Page Break modal in Joomla 6.
The Page Break modal can be opened without a loaded article item, which
caused warnings for id and checked_out in the article HtmlView.
Fixes #46901
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_content Front End com_banners |
| Labels |
Added:
PR-5.4-dev
|
||
| Category | Administration com_content Front End com_banners | ⇒ | Administration com_content |
Thanks for checking π
Yes, this fix is primarily for Joomla 6. I can rebase and retarget the PR to 6.0-dev if thatβs preferred.
I have tested this item β
successfully on 69a0e27
Confirmed the fix for Joomla 6.1.0 beta 1
Thanks for testing and confirming π
| Labels |
Added:
bug
PR-6.0-dev
Removed: PR-5.4-dev |
||
@sathwikre As the fixed issue is specific for 6.x and does not happen in 5.4, I've allowed myself to rebase your PR to 6.1-dev and fix the conflict caused by changes made in the 6.0-dev branch in past at the same place. Please check if the changed file on GitHub shows what you expect.
@mariantanase Please test again, preferably on 6.0 and not 6.1, and submit the test result again. Thanks in advance.
I have tested this item β
successfully on d1c714c
Confirmed that the fix works as expected on Joomla 6.0.3 as well.
@sathwikre As the fixed issue is specific for 6.x and does not happen in 5.4, I've allowed myself to rebase your PR to 6.1-dev and fix the conflict caused by changes made in the 6.0-dev branch in past at the same place. Please check if the changed file on GitHub shows what you expect.
@mariantanase Please test again, preferably on 6.0 and not 6.1, and submit the test result again. Thanks in advance.
Thanks for rebasing and resolving the conflict π
Iβve reviewed the updated file and it looks correct to me.
Thanks for rebasing and resolving the conflict π
Iβve reviewed the updated file and it looks correct to me.
I have tested this item β
successfully on d1c714c
No more warnings after applying the fix on 6.0.3
| Status | Pending | ⇒ | Ready to Commit |
RTC
I have tested this item β
successfully
It works too #46920
The fix here does not look good, It makes our code ugly. I would say all you need to do is add this simple code to the beginning of addToolbar method and the issues should be sorted:
if ($this->getLayout() === 'pagebreak') {
return;
}| Status | Ready to Commit | ⇒ | Pending |
| Build | 5.4-dev | ⇒ | 6.0-dev |
Back to pending due to requested changes. See previous comment.
@sathwikre Could you change your PR according to @joomdonation 's comment above? If you have questions let us know. Thanks in advance.
| Labels |
Added:
Updates Requested
|
||
Thanks for the suggestion π
Iβve updated the PR to skip toolbar creation for the pagebreak layout by returning early in addToolbar().
Please let me know if this looks good now.
Thanks for the suggestion π Iβve updated the PR to skip toolbar creation for the pagebreak layout by returning early in addToolbar(). Please let me know if this looks good now.
@sathwikre I think that's not what @joomdonation meant. He meant that his suggestion should be the only code change compared to the original code, and all your other changes should be reverted, but your PR still shows other changes besides that, compared to the original code.
@joomdonation Please confirm or correct me.
@joomdonation Please confirm or correct me.
Yes, that's correct. As of right now, the PR contains unnecessary changes and these changes should be reverted. The only changes needed to solve the issue is #46908 (comment) . @sathwikre Could you please check ?
Thanks for the clarification π
Iβve reverted all unrelated changes and kept only the early return in addToolbar() for the pagebreak layout.
Please let me know if this looks correct now.
Thanks for the clarification π Iβve reverted all unrelated changes and kept only the early return in addToolbar() for the pagebreak layout. Please let me know if this looks correct now.
@sathwikre No, you also remove code, see my previous comment.
Sorry for the confusion β that was my mistake.
I initially removed that check while trying to simplify the flow, but I understand now that it is still required in initializeView() and should not have been touched.
Iβve restored the original code there and kept only the early return in addToolbar() for the pagebreak layout, which is the actual fix needed for this issue.
Thanks for catching this.
@mariantanase @OctavianC @basn63 Could you test this PR again with the latest changes? Thanks in advance.
I have tested this item β successfully on abf155b
I have tested this item β
successfully on abf155b
Tested with JBT
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Labels |
Added:
RTC
Removed: Updates Requested |
||
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-03-19 07:44:03 |
| Closed_By | ⇒ | Bodge-IT |
Thanks @sathwikre for the fix and to contributors and testers
@sathwikre Should this PR be rebased to 6.0-dev?