Multilingual: displaying a single contact which was inserted in an article via xtd (a single contact menu item works fine)
0 Argument 1 passed to Joomla\Registry\Registry::merge() must be an instance of Joomla\Registry\Registry, null given, called in /Applications/MAMP/htdocs/newfolder/joomla40/components/com_contact/Model/ContactModel.php on line 118
Displaying a contact category from a List All Contact Categories menu item page
PHP Fatal error: Cannot declare class Joomla\Component\Contact\Site\Helper\Route, because the name is already in use in /Applications/MAMP/htdocs/newfolder/joomla40/components/com_contact/helper/route.php on line 23
Trying to display a Contact category from a single contact page => 404
These errors also present after merging #20692
Labels |
Added:
?
|
Status | New | ⇒ | Discussion |
Category | ⇒ | com_contact |
Labels |
Added:
J4 Issue
|
So $registry = new Registry($value); has to become:
No, constructor still allow you to put empty string or null.
Michael only want to change loadString()
method.
On J4, you can use:
$registry = new Registry('');
$registry = new Registry(null);
but you can not:
$registry = (new Registry())->loadString('');
$registry = (new Registry())->loadString(null);
Take a look at the constructor at https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/vendor/joomla/registry/src/Registry.php#L65
Currently, Registry
has been updated for J3.x and it is not strict, J4.x has an older version with strict code.
Ok then I was wrong. Not sure if Michael is pushing that change into 2.x.
For me 2.x should be strict.
As I said. I'm fine with both options. Np.
The CMS is behind a bit on some of the Composer dependencies in 4.0. As far as the framework repos go everything committed to master (1.x) is being merged regularly into the 2.0-dev branches, so there are few if any behavioral differences aside from intended changes. We just need to composer update
things here, a lot of packages haven't been updated in a while.
Small reminder: we also have the fatal error concerning the class declaration here, and same for Newsfeeds.
has this been resolved?
Closing as this has indeed been solved.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-26 09:12:05 |
Closed_By | ⇒ | infograf768 |
This is due the fact that the Registry class doesn't allow null values anymore. More information about this topic can be found in #20675. The consequence is that every instantiate or merge needs to be surrounded by an if block. So
$registry = new Registry($value);
has to become: