-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
dev/core#1987: Fix theme configuration section on Display preference and improve isFrontendPage
function for Drupal CMS.
#18322
Conversation
Can one of the admins verify this patch? |
(Standard links)
|
@swastikpareek Thankyou. Can you submit two separate PRs (link to the same lab issue #1987) for the two issues. I agree that both issues should be fixed but they are different things. |
@@ -660,7 +660,7 @@ public function isFrontEndPage() { | |||
|
|||
// Get the menu for above URL. | |||
$item = CRM_Core_Menu::get($path); | |||
return !empty($item['is_public']); | |||
return (empty($item) || !empty($item['is_public'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swastikpareek Can you add comments here explaining why (use the comments you already made on dev/core#1987)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure will do.
Jenkins add to whitelist |
I think this is good idea. The old conditional was put in there before the Drupal integration officially made a distinction (eg before 68e3bc3). Now that it makes the distinction, it's important to show both settings. |
I think we don't need a test as it is just removing logic & form layer |
As per @mattwire, the PR is split into two different PR as they both are different issues
Please let me know if anything else needs to be done here. Closing this PR. Thanks. |
Overview
Drupal webform pages may have CiviCRM fields which internally initialize CiviCRM assets and was loading CiviCRM current theme assets. This is because CiviCRM doesn't have the logic for checking Drupal webform pages, whether they are FE pages or backend and since the logic is incomplete it loads the backend theme which because of this logic.
Also, CiviCRM, to handle front end pages theme (public pages) and backend pages theme (CiviCRM pages) separately contains a configuration under
civicrm/admin/setting/preferences/display?reset=1
. Where it provides a configuration field for the backend and the front end theme separately.This works for all CMS except Drupal. For Drupal, it only had the
Theme
option which configures only the backend theme. This PR enables both the options for Drupal CMS too and also makes sure the correct theme (front end theme) is loaded on Drupal webform pages which loads CiviCRM components.Before
Also, the CiviCRM was loading backend theme for the Drupal public web form pages which loads CiviCRM components.
After
Also, the CiviCRM was loading the front theme for the Drupal public web form pages which loads CiviCRM components.
Technical Details
Display.tpl
was fixed so that both front end and backend theme configuration was provided to the end-userisFrontEndPage
is updated so that it treats Drupal public web form pages as CiviCRM public pages and load front end theme there.