New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Deprecate WebApplication::$JComponentTitle #43304
Conversation
I have tested this item ✅ successfully on 247c409 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43304. |
J 5.2.0-alpha1-dev This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43304. |
I have tested this item ✅ successfully on 247c409 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43304. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43304. |
The usage in mod_title goes back to at least joomla 1.6 and I suspect earlier (
|
Replacement is set or get title Form the document AS documented in the deprecation. |
Should you then not fallback to the document title here https://github.com/joomla/joomla-cms/pull/43304/files#diff-a35dff7f70b05500db42e3f582368ededb2d2477bbc955142c16a0038e184a6cR40, when this should be the replacement? |
We do this when the variable gets removed in 7.0
Until then we have to use the variable because we can't (or don't do) intercept when someone sets the JComponentTitle by hand in the application. So yes in 7.0 we have to use document->getTitle() in the module. |
I think this should be done now as fallback, something like:
|
since this is only used for mod_title and only in combination with the toolbar::title function it's something which would be a behavior change which could be unexpected. ex. if your want to remove the title for you extension Extension developer have to set it in only a thought I have I didn't proofed if this is a usecase |
As it is an isset() check, '' or null would still work, as long as the variable exists. |
I'm sorry but that's wrong |
True, null is not covered |
Thanks @HLeithner ! |
Summary of Changes
Deprecate the legacy parameter $JComponentTitle from WebApplication. This should have been done when the variable has been created. Sadly it has been missed.
Testing Instructions
No test needed
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed