Joomla issueshttps://lab.civicrm.org/dev/joomla/-/issues2024-02-12T17:51:40Zhttps://lab.civicrm.org/dev/joomla/-/issues/54Joomla 5 compatibility2024-02-12T17:51:40Zchrisgaraffachris@aghstrategies.comJoomla 5 compatibilityWe started a small discussion about J5 compatibility on Mattermost recently in the context of people still doing J4 upgrades: https://chat.civicrm.org/civicrm/pl/t9sywefr1jrainqbww9x7etb7y
With a fresh installation of J5 in a supported ...We started a small discussion about J5 compatibility on Mattermost recently in the context of people still doing J4 upgrades: https://chat.civicrm.org/civicrm/pl/t9sywefr1jrainqbww9x7etb7y
With a fresh installation of J5 in a supported environment (PHP 8.1.2, Ubuntu 22.04, MariaDB 10.6), CiviCRM requires one patch to properly finish installation in com_civicrm/admin/civicrm/vendor/psr/log/Psr/Log/NullLogger.php, changing the method signature of log to specify a void return type and the type for $message:
``` diff
diff --git a/NullLogger.php b/NullLogger.php
index c8f7293..39c3969 100644
--- a/NullLogger.php
+++ b/NullLogger.php
@@ -23,7 +23,7 @@ class NullLogger extends AbstractLogger
*
* @throws \Psr\Log\InvalidArgumentException
*/
- public function log($level, $message, array $context = array())
+ public function log($level, \Stringable|string $message, array $context = array()) : void
{
// noop
}
```
This is from the [psr/log library](https://packagist.org/packages/psr/log). Joomla 5 is using version 3, Civi seems to be on 1.x.
After that update and manually repackaging the nightly installer for Joomla, the installation finishes and basic functionality seems to work.
However, union types (`\Stringable|string`) are [not supported before PHP 8.0](https://www.php.net/manual/en/language.types.declarations.php). We're supporting PHP 7.3 for just a little while longer and I imagine 7.4 for quite some time after that. [Joomla 5 requires PHP 8.1](https://docs.joomla.org/Portal:Joomla_5) so this puts Civi in a difficult position for J5 compatibility as we can't just upgrade psr/log.Joomla 5 integrationseamusleeseamusleehttps://lab.civicrm.org/dev/joomla/-/issues/16[Joomla 4.0] Warnings when CiviCRM is uninstalled2022-08-12T05:14:12ZAndrew Thompson[Joomla 4.0] Warnings when CiviCRM is uninstalledTwo PHP warnings are displayed when uninstalling CiviCRM from Joomla 4.0 alpha 11:
```
Warning: require_once(CRM/Utils/String.php): failed to open stream: No such file or directory in /var/www/html/j4/administrator/components/com_civic...Two PHP warnings are displayed when uninstalling CiviCRM from Joomla 4.0 alpha 11:
```
Warning: require_once(CRM/Utils/String.php): failed to open stream: No such file or directory in /var/www/html/j4/administrator/components/com_civicrm/script.civicrm.php on line 226
```
```
Fatal error: require_once(): Failed opening required 'CRM/Utils/String.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/j4/administrator/components/com_civicrm/script.civicrm.php on line 226
```Joomla 4 Integrationhttps://lab.civicrm.org/dev/joomla/-/issues/50Dead code files in civicrm-joomla repo?2023-05-15T08:02:24ZAllenShawDead code files in civicrm-joomla repo?CiviCRM / Joomla / PHP 8 seems to be a viable combination (per some quick testing, and comments from @seamuslee and @nicol in https://lab.civicrm.org/dev/joomla/-/issues/43).
Yet several files in the civicrm-joomla repo contain syntax e...CiviCRM / Joomla / PHP 8 seems to be a viable combination (per some quick testing, and comments from @seamuslee and @nicol in https://lab.civicrm.org/dev/joomla/-/issues/43).
Yet several files in the civicrm-joomla repo contain syntax errors under PHP 8, specifically (in line 53, and other lines) in these files:
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Events/tmpl/default.php#L53
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Events/tmpl/register.php#L53
- https://github.com/civicrm/civicrm-joomla/blob/master/site/views/Profiles/tmpl/default.php#L53
So: I'm not sure if the above files are just dead code (i.e. they never run), or if they need to be cleaned up for proper PHP 8 support.https://lab.civicrm.org/dev/joomla/-/issues/49CIVI CRM Menu does not show output when SEF is ON - Joomlai2023-08-25T20:05:21ZjoomCIVI CRM Menu does not show output when SEF is ON - JoomlaiHi
i updated the website to Joomla 4 and also updated CIVI to latest version and
PHP to PHP 8.
all seems fine on updates but on frontend no CIVI CRM menu item is showing any output with Joomla 4.
If i use system URL it works fine.
No ch...Hi
i updated the website to Joomla 4 and also updated CIVI to latest version and
PHP to PHP 8.
all seems fine on updates but on frontend no CIVI CRM menu item is showing any output with Joomla 4.
If i use system URL it works fine.
No change if i downgrade PHP version and turn off mod rewrite as well.
With SEF OFF or if copy the menu system URL its works fine **/index.php?option=com_civicrm&view=Dashboard&task=civicrm/user&reset=1&itemid=294**![Screenshot_3](/uploads/672b1f3257e0a6f17963cbbf1f964b59/Screenshot_3.png)https://lab.civicrm.org/dev/joomla/-/issues/48CiviCRM profiles don't produce working webpages2023-05-15T18:56:34ZSOAPCiviCRM profiles don't produce working webpagesAfter upgrading my site to Joomla 4 all CiviCRM pages that are based on a CiviCRM profile refuse to display their content. Under Joomla 3 a page would render into a URL like website.org/name/user-directory. Under Joomla 4 the same page r...After upgrading my site to Joomla 4 all CiviCRM pages that are based on a CiviCRM profile refuse to display their content. Under Joomla 3 a page would render into a URL like website.org/name/user-directory. Under Joomla 4 the same page renders into the URL website.org/organisation/user-directory?view=Profiles&layout=search&task=civicrm/profile&gid=22&reset=1
Because the website (with its 100s of pages) uses mod_rewrite to remove the 'index.php' it also removes the index.php from the Joomla 4 CiviCRM URL. Adding the index.php manually to the URL in the browser does produce the information of the profile. It seems to me that under Joomla 3 that CiviCRM was working under an alias while under CiviCRM a long version of the URL is pushed to the browser that is messed up by the mod_rewrite. Anyway, in the current form I can't upgrade.
I include a screenshot of the type of menu where this issue occurs.
![Screenshot_2023-03-04_at_18.16.37](/uploads/461075cda2c4581d4abe42efc62cd622/Screenshot_2023-03-04_at_18.16.37.jpg)https://lab.civicrm.org/dev/joomla/-/issues/47Joomla upgrade process doesn't respect having different CiviCRM and Joomla da...2023-04-12T12:37:26Zchrisgaraffachris@aghstrategies.comJoomla upgrade process doesn't respect having different CiviCRM and Joomla databasesIf CiviCRM is using a different database than Joomla (CIVICRM_UF_DSN and CIVICRM_DSN are not the same), the Joomla upgrade process writes the new civicrm.settings.php files with both set to
This causes some chaos when the upgrade is "d...If CiviCRM is using a different database than Joomla (CIVICRM_UF_DSN and CIVICRM_DSN are not the same), the Joomla upgrade process writes the new civicrm.settings.php files with both set to
This causes some chaos when the upgrade is "done" as both settings files need to be updated quickly, and Civi unnecessarily creates all its tables again in the Joomla database.
A possible fix would be to have [civicrm_config](https://github.com/civicrm/civicrm-joomla/blob/28596149e1afe37d44d90e82809adfee7feb45c8/admin/configure.php#L230) get passed CIVCIRM_UF_DSN from [civicrm_source](https://github.com/civicrm/civicrm-joomla/blob/28596149e1afe37d44d90e82809adfee7feb45c8/admin/configure.php#L180) and parse it, using those values for `dbUser`, `dbPass`, `dbHost`, `dbName` instead of the `$jConfig` values. The function already gets passed site, credential & sign keys.
I haven't worked on a PR but will probably have time in the next week or two if there's interest.https://lab.civicrm.org/dev/joomla/-/issues/46KC Finder Not Working Under Joomla 42023-12-11T14:04:46ZcrusonwebKC Finder Not Working Under Joomla 4I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this o...I have discovered that currently KC Finder will not work under Joomla 4. If you click the Browse Server button when inserting an image into the editor using CKEditor 4, CKEditor 5 or TinyMCE you get a 500 error. I have recreated this on multiple client sites running Joomla 4.2.7 and 4.2.8 and CiviCRM 5.57.0 and 5.58.1. I have also recreated it on the Joomla 4 demo site, although I had to turn off Mosaico to do so (since it is on by default).
I did some digging and the problem appears to rest in the authenticate_joomla function within /packages/kcfinder/integration/civicrm.php which is using JFactory::getApplication('administrator'). Under Joomla 4, getApplication doesn't work the same way it did under Joomla 3 so you get the non-descript 500 error screen. I updated the code with the following block and that worked in most of my cases:
```
if (version_compare(JVERSION, '4.0.0', 'lt')) {
$mainframe = JFactory::getApplication('administrator');
$mainframe->initialise();
$user_id = JFactory::getUser()->id;
} else {
// Boot the DI container.
$container = \Joomla\CMS\Factory::getContainer();
// Alias the session service key to the web session service.
$container->alias(\Joomla\Session\SessionInterface::class, 'session.web.site');
// Get the application.
$app = $container->get(\Joomla\CMS\Application\AdministratorApplication::class);
$user_id = Joomla\CMS\Factory::getUser()->id;
}
```
In all but one case this got KC Finder working, that last case I ended up with the folder and file fields both saying "Unknown Error" which I am thinking is due to something specific to that site and not Civi. However, I am not 100% confident my approach is the right one so I wanted to raise this as an issue so another set of eyes could confirm or correct my solution.Monish DebMonish Debhttps://lab.civicrm.org/dev/joomla/-/issues/45Remove sidebar (at least for Joomla 4)2023-08-27T20:55:45ZnicolRemove sidebar (at least for Joomla 4)Joomla 4 has a sidebar, which defaults open, and means the Civi sidebar squashes the important info even more…
As WordPress and Drupal Civi cope ok without this sidebar, maybe it's time to remove the sidebar from Joomla (or at least for...Joomla 4 has a sidebar, which defaults open, and means the Civi sidebar squashes the important info even more…
As WordPress and Drupal Civi cope ok without this sidebar, maybe it's time to remove the sidebar from Joomla (or at least for Joomla 4)
![image](/uploads/c5fdc516916c3d36c925976bbfc3be2c/image.png)https://lab.civicrm.org/dev/joomla/-/issues/44Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected t...2023-01-24T16:19:34ZpotClass Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did notUsing php 7.4 and civicrm 5.57.1 on Joomla I see:
```
$ php74 domains/domain.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s domain.org -u cronjob -p cronjob-pass -e Job -a execute
-->
WARNING: Class Civi\Api4...Using php 7.4 and civicrm 5.57.1 on Joomla I see:
```
$ php74 domains/domain.org/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php -s domain.org -u cronjob -p cronjob-pass -e Job -a execute
-->
WARNING: Class Civi\Api4\Event\Subscriber\ActivityPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\ContributionPreSaveSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Civi\Api4\Event\Subscriber\CustomGroupPreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class Class Civi\Api4\Event\Subscriber\OptionValuePreCreationSubscriber was expected to have a service definition, but it did not. Perhaps it needs service name.
WARNING: Class PHP Deprecated: Non-static method JApplication::getMenu() should not be called statically in/home/usiako1s/domains/domain.org/public_html/plugins/authentication/civicrm//civicrm.php on line 305
```https://lab.civicrm.org/dev/joomla/-/issues/43PHP 8 causes 500 error2023-04-24T14:17:55Zjoshjosh@civicrm.orgPHP 8 causes 500 errorUpgrading from PHP 7.4 to PHP 8.0 on Joomla 4.2.5 and CiviCRM 5.56 results in a 500 error. Sample can be viewed at https://cividemo.com (currently running PHP 8.0), specifically at a public contribution page: https://cividemo.com/simple-...Upgrading from PHP 7.4 to PHP 8.0 on Joomla 4.2.5 and CiviCRM 5.56 results in a 500 error. Sample can be viewed at https://cividemo.com (currently running PHP 8.0), specifically at a public contribution page: https://cividemo.com/simple-contribution-page?view=Contributions&task=civicrm/contribute/transact&id=1&reset=1 as well as in the admin interface when browsing to: https://cividemo.com/administrator/index.php?option=com_civicrm
I believe this is related to permissions. If I enable or disable a user in Joomla, the site throws the same here. Here's a screencast: https://www.awesomescreenshot.com/video/13122436?key=fa4d6f06dd5831141ce90b1f9f89e82c
Note that I'm clicking the back button in the browser (not viewable in the screencast), yet you can see that the change to the user's state does take effect.
Moreoever, when reviewing user permissions for CiviCRM in the global configuration I receive this error:
`An error has occurred.
0 Failed opening required '/home/cividemo/public_html/libraries/joomla/form/fields/rules.php' (include_path='.:/opt/remi/php80/root/usr/share/pear:/opt/remi/php80/root/usr/share/php:/usr/share/pear:/usr/share/php')`seamusleeseamusleehttps://lab.civicrm.org/dev/joomla/-/issues/405 broken/dated links in post-install success screen for Joomla2022-10-11T22:50:40Znicol5 broken/dated links in post-install success screen for JoomlaOn successfully installing CiviCRM on Joomla (I'm assuming not on the other CMSs), there's a welcome screen with four links to the old wiki/confluence (ie 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades') whi...On successfully installing CiviCRM on Joomla (I'm assuming not on the other CMSs), there's a welcome screen with four links to the old wiki/confluence (ie 'http://wiki.civicrm.org/confluence/display/CRMDOC/Installation+and+Upgrades') which would better point to new (https) docs pages. The register a site link is also broken.
I'm happy to make a PR for this but not sure where the file is located, I checked in https://github.com/civicrm/civicrm-core/tree/master/install & https://github.com/civicrm/civicrm-joomla but couldn't see it. Maybe it's not an actual smarty template but something that's passed to Joomla's UI as it looks natively styled in J3 and J4?
![image](/uploads/8b0a011ff0531bcfc719e6b4eb5e30b0/image.png)
New links needed for:
- 'Installation Guide' - I guess to this: https://docs.civicrm.org/user/en/latest/initial-set-up/installation-and-basic-set-up/
- Create front-end forms and searchable directories using Profiles - https://docs.civicrm.org/user/en/latest/organising-your-data/profiles/
- Create online contribution pages - https://docs.civicrm.org/user/en/latest/contributions/online-contributions/
- Create events with online event registration - https://docs.civicrm.org/user/en/latest/events/what-is-civievent/
- Register a site - https://civicrm.org/register-a-sitenicolnicolhttps://lab.civicrm.org/dev/joomla/-/issues/32Resource URL for images is really "media"?2021-05-25T11:07:57Zthoni56Resource URL for images is really "media"?CiviCRM 5.36.1 on Joomla 3.9.26
In Administer->Resource URL:s there is a setting that is named "Image Upload URL", but I'm suspecting that it is actually the base path for [civicrm.files] to which settings on Administer->Directories are...CiviCRM 5.36.1 on Joomla 3.9.26
In Administer->Resource URL:s there is a setting that is named "Image Upload URL", but I'm suspecting that it is actually the base path for [civicrm.files] to which settings on Administer->Directories are added ("images", "files", "custom_ext", etc.)?
With the label and help text you are led to believe that
1. It is only for images
2. It is only for upload
This has made us set it to `/media/civicrm/images` (on Joomla) and we are now uploading images to `media/civicrm/images/images` uploading files to `/media/civicrm/images/files` etc.
If my interpretation is correct, I'd suggest that the label, lead and help texts for the field should be updated to not include "images" but say "media", and even "[civicrm.files]" instead.
If not, then the duplicated "images" in image directory is the problem I could get around setting the resource-URL for upload of images to just `/media/civicrm`. But that trashed the CiviCRM menus.
I feel there is an inconsistency here.https://lab.civicrm.org/dev/joomla/-/issues/30Smarty setting resets to 0 on upgrade2020-11-09T13:45:59Zjoshjosh@civicrm.orgSmarty setting resets to 0 on upgradeOn upgrade, the smarty setting on lines 308 - 310 referenced below of the civicrm.settings.php in the file located in the joomla directory: components/com_civicrm reverts from "1" to "0"
The corresponding file in: administrator/compone...On upgrade, the smarty setting on lines 308 - 310 referenced below of the civicrm.settings.php in the file located in the joomla directory: components/com_civicrm reverts from "1" to "0"
The corresponding file in: administrator/components/com_civicrm remains unchanged on upgrade.
The expected behavior is that both settings, which appear necessary for smarty to work, would remain regardless of upgrade.
`if (!defined('CIVICRM_MAIL_SMARTY')) {
define( 'CIVICRM_MAIL_SMARTY', 1 );
}
`https://lab.civicrm.org/dev/joomla/-/issues/23Frontend form field labels are not styled well on Joomla 32020-01-14T14:55:04ZAndrew ThompsonFrontend form field labels are not styled well on Joomla 3As shown in this screenshot, the field labels have an ugly grey background and white text applied to the `.label` CSS class, at least on the Joomla 3 default 'Protostar' site (frontend) template.
![image](/uploads/4e7a8e4a2f0d000f75a6ea8...As shown in this screenshot, the field labels have an ugly grey background and white text applied to the `.label` CSS class, at least on the Joomla 3 default 'Protostar' site (frontend) template.
![image](/uploads/4e7a8e4a2f0d000f75a6ea84d8046f42/image.png)
Of course this could be overridden by a savvy user with custom CSS but it does degrade the out-of-box experience for a new Joomla 3 user.https://lab.civicrm.org/dev/joomla/-/issues/21cron.php broken since Joomla 3.8 in some PHP environments2021-02-26T08:34:13ZAndrew Thompsoncron.php broken since Joomla 3.8 in some PHP environmentsThis issue was mentioned in https://issues.civicrm.org/jira/browse/CRM-21203 and the [associated PR](https://github.com/civicrm/civicrm-core/pull/11609), which eventually solved problems for cli.php. But there is a session issue that has...This issue was mentioned in https://issues.civicrm.org/jira/browse/CRM-21203 and the [associated PR](https://github.com/civicrm/civicrm-core/pull/11609), which eventually solved problems for cli.php. But there is a session issue that hasn't gone away for cron.php so I am reporting that here.
Depending on PHP error reporting settings (and PHP version possibly, certainly it happens on PHP 7+), this warning will be given:
```
Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in /var/www/html/membership/libraries/joomla/session/handler/joomla.php on line 48
```
Which may also cause this one:
```
Warning: session_cache_limiter(): Cannot change cache limiter when headers already sent in /var/www/html/membership/libraries/joomla/session/handler/native.php on line 235
```
Followed by this error:
```
Error: Failed to start application: Failed to start the session because headers have already been sent by "/var/www/html/membership/libraries/joomla/session/handler/joomla.php" at line 48.
```
The cron.php problem started in Joomla 3.8 [due to a change that Joomla made](https://github.com/joomla/joomla-cms/commit/5b92dc69b39240debc69fb90c7f8d71f060631e8#diff-bf82c85e1f29a328e842c4a195392b10) to `JSessionHandlerJoomla::__construct()` in `libraries/joomla/session/handler/joomla.php`.
It could be fixed by Joomla, however I have given up on that. There was an abandoned [Joomla PR #15742](https://github.com/joomla/joomla-cms/pull/15742), superseded by [PR #21260](https://github.com/joomla/joomla-cms/pull/21260), which is also languishing. Anyway we might be better off fixing this on the CiviCRM side.
This is a similar (but separate) case to [https://github.com/civicrm/civicrm-core/pull/14074](https://github.com/civicrm/civicrm-core/pull/14074), where `extern/rest.php` called `session_start()` before bootstrapping the CMS - that issue referred to Drupal though I am sure that it applied to Joomla also (don't know about Wordpress). Removing session_start() was the solution for that REST session problem.