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
Factory::getLanguage() is deprecated #37729
Comments
it is dprecated for removal in 5.0 |
Closing as this is intended. |
Hi all, So I backed up my RSFormpro! forms from joomla 3.x and restored them them in the joomla 4.x (test site). via the RSFormProl extension. However when I run the form in joomla 4.x (with debug on) I am getting errors like this. Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). 16384 I know previously when going from joomla 3.x to joomla 4.x, I basically had to reinvent the wheel and reproduce stuff manually. Do you think I have to go from scratch and create a new form in joomla 4.x ? Let me know what you think Rick Ambrosino |
Why don't you disable debug? Or switch it to more silent? |
Hi, I turned on debug to find out where the errors were with my RSFormPro form that I created. I did turn it off though. I probably am going to create a form from scratch and put all the setting in their from my previous forms that I upload into joomla 4.x from joomal 3.x. Rick Ambrosino |
@rambro Creating a new form won't help solving your issue. Better contact RSFormPro developer, ask them to check and solve the issue in their extension. |
What I meant: You can configure debugging less noisy. If you use for example n3t Debug plugin you can switch off USER_DEPRECATED messages and others. You don't need then Joomla's debug configuration and "Error reporting". At the moment it is a waste of time to debug Joomla inclusive USER_DEPRECATED messages when you are not a developer. Even Joomla Core is throwing hundreds of these messages, e.g. in HTMLHelper. If an extension also wants to support 4.0, 4.1 by promise it is almost pointless. |
Steps to reproduce the issue
Install plugin n3t Debug - https://bitbucket.org/n3t/n3t-debug/downloads/
Setup - Scream - YES
Expected result
Without all deprecated errors :)
Actual result
PHP User Deprecated: Joomla\CMS\Factory::getLanguage() is deprecated. Load the language from the dependency injection container or via Joomla\CMS\Factory::getApplication()->getLanguage(). in .../joomla4.easy.minion.cz/public_html/libraries/src/Factory.php:273
System information (as much as possible)
J4.2.1
PHP7.4.21
Additional comments
The text was updated successfully, but these errors were encountered: