Skip to content
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

Fix WSOD on language prefixes #629

Open
wants to merge 3 commits into
base: 2.x
Choose a base branch
from

Conversation

jofranz
Copy link

@jofranz jofranz commented Jan 9, 2024

Fix for #567

Previous behavior

Opening an existing template leads to a white screen of death

Current behavior

Template can be opened or edited without problems

Testing

Has been tested with a customer

Credits

#567 (comment) was suggested fix by @CsarRamos (would you like to test it?)

Ref

systopia reference: 23566

@jofranz jofranz changed the title 23566 domain prefix Fix WSOD on language prefixes Jan 9, 2024
@demeritcowboy
Copy link

Part of the difficulty I think is trying to satisfy both multilingual and multisite urls. I know very little about multisite, but does CIVICRM_UF_BASEURL work with multisite? It looks like it might but the section this PR is editing is intended to only be hit by multisite, but because of the reasons I described at #567 (comment) every site hits this line. So my two cents is the multisite part needs to be worked out first, so that the right code can be targeted.

@kainuk
Copy link

kainuk commented Jan 15, 2024

I had just created a PR with the same intent, but a different method to find the base url

$currentURL = \Civi::paths()->getVariable('cms.root', 'url') . $templatePath;

@jofranz
Copy link
Author

jofranz commented Jan 15, 2024

I had just created a PR with the same intent, but a different method to find the base url

$currentURL = \Civi::paths()->getVariable('cms.root', 'url') . $templatePath;

Oh cool. Where can I find it?

@jofranz
Copy link
Author

jofranz commented Jan 15, 2024

Part of the difficulty I think is trying to satisfy both multilingual and multisite urls. I know very little about multisite, but does CIVICRM_UF_BASEURL work with multisite? It looks like it might but the section this PR is editing is intended to only be hit by multisite, but because of the reasons I described at #567 (comment) every site hits this line. So my two cents is the multisite part needs to be worked out first, so that the right code can be targeted.

I see. I hope I will find some customer time to look into this

@kainuk
Copy link

kainuk commented Jan 22, 2024

Copy link

@Rar9 Rar9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works on d10.2 with last civicrm php 8.2

@adixon
Copy link

adixon commented Dec 4, 2024

I don't have any insight on the multi-site issue, but appreciate this PR because it fixes a clients' multi-lingual install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants