Closed ReLater closed 3 years ago
Could this be closed? #422?
My pr is only for the module. Looks like #422 is also talking about the component. Therefore: I don't know.
Hi, I installed com_weblinks 4.0.0-dev in Joomla version, 4.0.0-beta8-dev.
I receive an error at administrator/index.php?option=com_categories&extension=com_weblinks
1054 Unknown column 'c.published' in 'field list'
Which com_weblinks should I have installed?
Database Type | mysql |
---|
10.4.17-MariaDB utf8mb4_general_ci utf8mb4_general_ci None No 7.3.27 Apache/2.4.46 (Unix) OpenSSL/1.1.1i PHP/7.3.27 mod_perl/2.0.11 Perl/v5.32.1 apache2handler Joomla! 4.0.0-beta8-dev Development [ Mañana ] 2-February-2021 20:02 GMT Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0
@ReLater If you look at the model class, it could return false https://github.com/joomla-extensions/weblinks/blob/master/src/components/com_weblinks/models/category.php#L76 (in case database failure) and for that case, the error still happens.
I updated your PR abit to return empty array for that case. Hope that is OK for you.
Before patch, there is an error
After patch, the error is gone.
So I will merge this PR and we can continue working on other issues. Thanks !
Summary of Changes
Testing Instructions
Expected result
Actual result
Warning: count(): Parameter must be an array or an object that implements Countable in modules/mod_weblinks/mod_weblinks.php on line 17
See: https://github.com/joomla-extensions/weblinks/blob/master/src/modules/mod_weblinks/mod_weblinks.php#L17-L20