dev/financial#120 - Fix CiviCRM base URL on Joomla frontend #16761
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This fixes loading of several JS+CSS assets for front-end pages (such as the contribution page) on CiviCRM-Joomla.
See also: https://lab.civicrm.org/dev/financial/issues/120
(This PR is a revision/alternative to #16760 for which Seamus did the primary analysis. This variant iterates on code style.)
Background
administrator
component and frontend/user component.civicrm.settings.php
and a differentCIVICRM_UF_BASEURL
.administrator/components/com_civicrm/
. Regardless of whether the web-page is a frontend or backend screen, it should load JS/CSS assets from theadministrator
side.civicrm/bower_components
andcivicrm/packages
) changed subtly.Before
CiviCRM JS and CSS assets do not load on Joomla front end forms.
The asset URLs incorrectly point to (nonexistent) JS/CSS files in the user component.
The URL variable
[civicrm.root]
(and therefore[civicrm.packages]
,[civicrm.bower]
) does not truly point to the public URL of CiviCRM assets.After
CiviCRM JS and CSS assets do load on front end forms.
The asset URLs correctly point to (existent) JS/CSS files in the
administrator
component.The URL variable
[civicrm.root]
(and therefore[civicrm.packages]
,[civicrm.bower]
) does point to the public URL of CiviCRM assets.(Original description from seamus. Revised by totten.)