Skip to content

dev/joomla#36 - Fix fatal error in joomla with civicrm task query param #21922

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

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

jitendrapurohit
Copy link
Contributor

Overview

Fix fatal error in joomla with civicrm task query param

Before

CiviCRM Urls with task in it fails to load the page. To replicate

image

  • The URL that is formed is

https://cividemo.com/administrator/?option=com_civicrm&task=civicrm/contribute/task&reset=1&task=receipt&id=12

Note there are 2 task query params

task=civicrm/contribute/task

and

task=receipt

After

Replace task with task_item

Comments

Gitlab - https://lab.civicrm.org/dev/joomla/-/issues/36

@civibot
Copy link

civibot bot commented Oct 25, 2021

(Standard links)

@civibot civibot bot added the master label Oct 25, 2021
@seamuslee001
Copy link
Contributor

@jitendrapurohit Why doesn't this falter on any of the other tasks in other contexts? Have you checked if the task forms will support the new key?

cc @eileenmcnaughton @lcdservices @mattwire

@jitendrapurohit
Copy link
Contributor Author

jitendrapurohit commented Oct 26, 2021

There is no issue when the task param is in the session/request (which i think most of the action from the search forms work).

The problem with Send Receipt, Update Billing, Send Letter, etc is that these actions sets the task param in the URL (from the contact summary page), so the page is now loading with 2 task params in the URL eg

 /administrator/?option=com_civicrm&task=civicrm/contribute/task&reset=1&task=receipt&id=12
  • task=civicrm/contribute/task is set by Joomla
  • task=receipt is set by CiviCRM.

I think in this case, task=receipt overrides the original task civicrm/contribute/task and eventually fails to load the page.


Just to clarify -

Search form task dropdown already works fine.

It is only an issue when these task pages are loaded from contact summary page (i.e, for a single contact).

@eileenmcnaughton
Copy link
Contributor

OK - I get it - yeah - we need to change 'task' to something else - this will also affect search kit

I think this is OK & it covers the lines of code I found - @colemanw do you see any problems with search kit

@colemanw
Copy link
Member

Looks good to me. I believe SearchKit will adjust to the change without needing any updates.

@eileenmcnaughton
Copy link
Contributor

OK - let's merge it

@eileenmcnaughton eileenmcnaughton merged commit cd19746 into civicrm:master Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants