twomice / com.joineryhq.campaigntools

Other
0 stars 2 forks source link

Error when selecting Activities tab on Contact record #5

Open mrinkel opened 2 months ago

mrinkel commented 2 months ago

I just installed this extension. The basic features tested ok, but now, when I go into a contact record and click on the Activities Tab, I get the following error and the tab doesn't load:

Network Error Unable to reach the server. Please refresh this page in your browser and try again.

When I disable the extension, the problem goes away. If I enable the extension, the problem returns.

I've selected No to showing Show campaign on Activities tab in Campaign Tools: Settings with no change.

Joinery Campaign Tools: Version 1.2 CiviCRM site is running version 5.74.4 on Wordpress

twomice commented 2 months ago

Thanks for the report @mrinkel .

FYI, I'm able to reproduced this in Drupal, so will continue there unless WP turns out to be especially relevant.

Fatal error (visible if opening the Activities tab in a new browser tab) is:

Error: Cannot access protected property CRM_Activity_Page_Tab::$_action in campaigntools_civicrm_pageRun() (line 16 of /home/as/_laptop/projects/com.joineryhq.campaigntools/campaigntools.php).

I suspect this is caused by the fact that CiviCRM's Activities tab is now using newer SearchKit-based displays, which this extension wasn't built to handle.

I see a couple of options here:

  1. Improve the extension so that the Campaign is displayed on the Activities tab (per the design of this extension), without this fatal error.
    • If you have access to developer resources (your own skills, or a developer of your preference) to conttibute a code patch / PR to make this work, I'm certainly open to adding that fix to the extension.
    • If you'd like me to do this as a paid project, we can discuss that too.
  2. Modify the extension so that it no longer attempts to display Campaign on the Activities tab. If you like that idea, let me know; it should be easy enough that I could do it as a community contribution (i.e., without a fee).

I'm sorry it's not "just working as it should" right out of the box. I hope one of the options above will help you get what you need from it.

mrinkel commented 2 months ago

Thank you for the quick response. Option 2 will work for me because I don't really need it on the activities tab anyways. If I get to the point where it would be nice to have on the activities tab, I can dig into the code and submit a fix (I just don't have time at this point).

Thank you! Mark