christianwach / civicrm-admin-utilities

CiviCRM Admin Utilities is a WordPress plugin that modifies and enhances CiviCRM's appearance and behaviour in single site and multisite WordPress installs.
https://wordpress.org/plugins/civicrm-admin-utilities/
GNU General Public License v2.0
20 stars 10 forks source link

Issues on Public Registration & Profile Pages When Logged In #32

Open themak1985 opened 2 years ago

themak1985 commented 2 years ago

This may be a core issue as well.

Issue 1: The CiviCRM Menu is loading on event registration pages. Issue 2: When Radstock is enabled, it significantly changes the styling on the profile/page (almost as if unstyled)

Both of these issues only occur when logged in with civicrm permissions.

christianwach commented 2 years ago

@themak1985 Can you provide screenshots please? And is this issue different to #31?

themak1985 commented 2 years ago

@christianwach I think it might be the same as #31 - attached are screenshots

LOGGED IN WITH RADSTOCK ENABLED Screen Shot 2022-04-14 at 1 45 37 PM

NOT LOGGED IN Screen Shot 2022-04-14 at 1 45 53 PM

LOGGED IN WITH RADSTOCK DISABLED Screen Shot 2022-04-14 at 1 48 58 PM

ALSO ON PROFILES WHEN LOGGED IN AND RADSTOCK ENABLED Screen Shot 2022-04-14 at 1 52 15 PM

themak1985 commented 2 years ago

@christianwach we had to disable radstock as it began to effect all civicrm public pages.

christianwach commented 2 years ago

@themak1985 I can't reproduce this or #31 - what happens if you switch to one of the default WordPress themes?

christianwach commented 2 years ago

@themak1985 Also worth checking if you have any Javascript errors with your current theme.

One more thing - can you screenshot your CAU settings please?

christianwach commented 2 years ago

@themak1985 Ah, hang on... do you mean you've got Radstock set as a front end theme like this?

Screenshot 2022-04-19 at 18 23 24

If so, then yeah that won't work.

The reason there's a CiviCRM "theme" at all is that CAU uses it to detect admin pages in CiviCRM that use Bootstrap. The Radstock theme hasn't been designed for front-end use and most likely never will be.

The CAU settings page correctly describes the Radstock theme as a "CiviCRM Admin Theme" and most of the logic in CAU is in place so that people can style their front-end forms in the style of their WordPress theme and to make sure everything else can be switched off in order for that to happen cleanly.

themak1985 commented 2 years ago

It does not matter what option I put as Frontend Theme - the same result occurs when radstock is turned on. We don't need radstock as a front end theme.

I will check to see if there are javascript errors

christianwach commented 2 years ago

It does not matter what option I put as Frontend Theme - the same result occurs when radstock is turned on. We don't need radstock as a front end theme.

@themak1985 Sorry, but I don't really understand what you're saying here. As I said, Radstock is not a front-end theme.

Again:

I don't think I can help until I have more information.

themak1985 commented 2 years ago

This is quite strange - no JS, or any errors. The other site was a Divi built site, so I thought that was the cause of my issues, but it turns out it is on another site I manage too that uses the Astra theme, but I also tested with 2021 and 2020.

Disabling the CiviCRM Admin Utilities "Radstock" Theme is the only thing that solves the issue.

So strange. Screen Shot 2022-06-16 at 1 25 56 PM Screen Shot 2022-06-16 at 1 26 35 PM

christianwach commented 2 years ago

@themak1985 Can you send me the URL of a site showing the problem via MatterMost?

lcdservices commented 2 years ago

I just ran into this same issue after upgrade to the latest release of Civi (5.54.0) -- though we jumped from 5.51.x so it may have been an intervening version that caused the problem.

Radstock set as backend theme. Greenwich or "automatic" set as frontend theme. Frontend remains unstyled.

I think the issue may be with the Civi front/backend theme setting. I disabled Radstock via CAU and installed the Haystack extension. Despite only the backend theme being configured to use Haystack, both the front and back were themed with it. Fortunately Haystack holds up pretty well on the frontend, so I decided to just use it for now. But clearly something is off with the frontend/backend theme selection options.

christianwach commented 2 years ago

Despite only the backend theme being configured to use Haystack, both the front and back were themed with it. Fortunately Haystack holds up pretty well on the frontend, so I decided to just use it for now. But clearly something is off with the frontend/backend theme selection options.

@lcdservices Thanks for digging into this. If what you say here is reproducible, then it sounds like opening an issue on CiviCRM Core would be the best course of action.

christianwach commented 2 years ago

Radstock set as backend theme. Greenwich or "automatic" set as frontend theme. Frontend remains unstyled.

@lcdservices Do you mean always unstyled? Or unstyled with the same logged-in/logged-out variations as the OP?

lcdservices commented 2 years ago

Unstyled like the "logged in with radstock enabled" screenshot above. The civicrm.css file is not loaded. In my case it remained unstyled both when logged in and not logged in.

christianwach commented 2 years ago

@lcdservices The "logged in with radstock enabled" screenshot also (weirdly) has the CiviCRM menu - do you also have that? Is there a reference to the civicrm.css file in the page markup (perhaps it's a 404?) or is it missing entirely?

lcdservices commented 2 years ago

I'm not seeing the Civi menu on public pages at all. civicrm.css is missing entirely. It's not an error -- the file simply isn't loaded (not present in page source).

There's definitely something odd going on with Radstock. If Radstock is enabled, the frontend forms are persistently unstyled. Even if I go to display settings and try to explicitly set the frontend theme to Haystack or Greenwich, if Radstock is set as the backend theme, it prevents the other theme stylesheets from loading.

christianwach commented 2 years ago

@lcdservices Sorry, but I have not been able to reproduce this whatever I try and do... and it's just not possible for me to fix a problem that I can't see. So...

lcdservices commented 2 years ago

I tried reproducing this on one of my sandbox sites, but could not.

The site where it's occurring is running PHP 7.33, WP 5.5.3, Impreza theme. I don't think any other extensions would affect it. It's a pretty lean WP installation.

I'll do some more troubleshooting and let you know what I find, and will also keep an eye on other WP installs.

christianwach commented 2 years ago

Impreza theme

@lcdservices Well that's where I'd start my debugging journey. I've seen quite a few premium themes which look great but are rather shonky underneath. Hard to get help too, since no-one else fan see their code. Good luck.