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

dev/core#1905 force backend links for new "configure" buttons #18088

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

agh1
Copy link
Contributor

@agh1 agh1 commented Aug 6, 2020

Overview

The "Configure" buttons added in #17942 and edited in #18064 generate frontend links in WordPress and Joomla. This modifies them to force backend links.

Before

Link attempts to load admin form on frontend in CMSes with distinct front and back ends.

After

Backend link formed where appropriate.

@civibot
Copy link

civibot bot commented Aug 6, 2020

(Standard links)

@civibot civibot bot added the 5.29 label Aug 6, 2020
@agh1
Copy link
Contributor Author

agh1 commented Aug 6, 2020

CC @jitendrapurohit @eileenmcnaughton @MikeyMJCO

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

thanks @agh1 - I didn't know about that magic param (although I personally hate abbreviate-to-meaninglessness- in param names that's not new here

@agh1
Copy link
Contributor Author

agh1 commented Aug 7, 2020

@eileenmcnaughton yeah it's a bit of a scavenger hunt to find those params. If you look where the Smarty block is defined you can see it calls up CRM_Utils_System::crmURL(), and there is passes them along to CRM_Utils_System::url():

return self::url(
$p,
CRM_Utils_Array::value('q', $params),
CRM_Utils_Array::value('a', $params, FALSE),
CRM_Utils_Array::value('f', $params),
CRM_Utils_Array::value('h', $params, TRUE),
CRM_Utils_Array::value('fe', $params, FALSE),
CRM_Utils_Array::value('fb', $params, FALSE)
);

but you have to look there to find what those params stand for:

public static function url(
$path = NULL,
$query = NULL,
$absolute = FALSE,
$fragment = NULL,
$htmlize = TRUE,
$frontend = FALSE,
$forceBackend = FALSE
) {

@eileenmcnaughton
Copy link
Contributor

ouch

@jitendrapurohit
Copy link
Contributor

Thanks for the follow up PRs @agh1

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

Successfully merging this pull request may close these issues.

4 participants