dev/core#1987: Fix Drupal Base 'isFrontEndPage' function to consider Drupal public page for FE theme #18397
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
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.
Extract
The whole idea is to tell Civicrm to treat non civicrm pages (Drupal public pages) which loads civicrm code to treat them as the front end page and apply front end theme. Currently it doesn't it treats these pages as backend pages and apply the civicrm backend theme on them.
Before
The CiviCRM was loading backend theme for the Drupal public web form pages which loads CiviCRM components.
![Screenshot 2020-09-24 at 3 45 53 PM](https://user-images.githubusercontent.com/3340537/94133137-e6840400-fe7d-11ea-8418-3aa4d75f5b2d.png)
Webform page which has civicrm enabled
After
The CiviCRM was loading the front theme for the Drupal public web form pages which loads CiviCRM components.
![Screenshot 2020-09-24 at 3 48 03 PM](https://user-images.githubusercontent.com/3340537/94133149-ea178b00-fe7d-11ea-9261-b4853ba1e4d4.png)
Webform page which has civicrm enabled
Technical Details
isFrontEndPage
is updated so that it treats Drupal public web form pages as CiviCRM public pages and load front end theme there.Note
The before and after screenshots are added after adding a
![Screenshot 2020-09-24 at 3 50 01 PM](https://user-images.githubusercontent.com/3340537/94133091-d2d89d80-fe7d-11ea-833f-9167591049e4.png)
var_dump
ingetActiveThemeKey
function inThemes.php
.