CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • User Dashboard
Pages: [1]

Author Topic: User Dashboard  (Read 1479 times)

waynejb

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.21
  • CMS version: Joomla 2.5
  • MySQL version: 5
  • PHP version: 5.3.10
User Dashboard
November 27, 2012, 11:52:41 am
We have redirected users upon login to their CiviCRM Contact Dashboard.  If a user does not have a PCP page they should have one link to allow them to create a new page.  We get a repeat of create a new page that goes on forever.  See attached image.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User Dashboard
November 27, 2012, 02:13:37 pm
I've recreated this bug on my 4.2 local sandbox and posted an issue here:
http://issues.civicrm.org/jira/browse/CRM-11340

Can you try this patch (just adding 1 line to query) - I think that will take care of it:

Code: [Select]
Index: CRM/PCP/BAO/PCP.php
===================================================================
--- CRM/PCP/BAO/PCP.php (revision 43866)
+++ CRM/PCP/BAO/PCP.php (working copy)
@@ -189,6 +189,7 @@
 LEFT JOIN civicrm_pcp pcp ON pcp.pcp_block_id = block.id
 WHERE block.is_active = 1
 {$clause}
+GROUP BY block.id
 ORDER BY target_entity_type, target_entity_id
 ";
     $pcpBlockDao = CRM_Core_DAO::executeQuery($query);
Protect your investment in CiviCRM by  becoming a Member!

RachelWright

  • I post occasionally
  • **
  • Posts: 78
  • Karma: 3
  • CiviCRM version: 4.2.7
  • CMS version: Joomla 2.5.17
  • MySQL version: 5.5.37
  • PHP version: 5.4.26
Re: User Dashboard
November 28, 2012, 09:15:46 am
I too had noticed this problem but it was a long list of things to look into, thanks for the patch it works great!

waynejb

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.21
  • CMS version: Joomla 2.5
  • MySQL version: 5
  • PHP version: 5.3.10
Re: User Dashboard
November 28, 2012, 04:33:35 pm
Went in and added the one line of code: GROUP BY block.id

No change for me on user dashboard page.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: User Dashboard
November 28, 2012, 05:50:10 pm
Can you please clear your civicrm caches and delete the contents of files/civicrm/templates_c
Try asking your question on the new CiviCRM help site.

waynejb

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.21
  • CMS version: Joomla 2.5
  • MySQL version: 5
  • PHP version: 5.3.10
Re: User Dashboard
November 29, 2012, 05:54:41 am
Thanks for the reply.  I cleared my cache and removed everything in the temp folder.  Same issue, no change.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User Dashboard
November 29, 2012, 07:31:49 am
Can you dump the $query variable contents after line  194 in that file and then run that query in phpMyAdmin or mySQL command line. Would be helpful to see what's being returned.
Protect your investment in CiviCRM by  becoming a Member!

waynejb

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.21
  • CMS version: Joomla 2.5
  • MySQL version: 5
  • PHP version: 5.3.10
Re: User Dashboard
November 29, 2012, 09:42:40 am
See attached query image.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: User Dashboard
November 29, 2012, 10:51:10 am
hmm, perhaps it should be grouping on campaign id?
Try asking your question on the new CiviCRM help site.

waynejb

  • I’m new here
  • *
  • Posts: 22
  • Karma: 0
  • CiviCRM version: 4.21
  • CMS version: Joomla 2.5
  • MySQL version: 5
  • PHP version: 5.3.10
Re: User Dashboard
November 29, 2012, 05:51:35 pm
Question, why would there be so many records in pcp_block when there is only one actual campaign page setup?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: User Dashboard
November 29, 2012, 06:14:46 pm
I'm not sure what's going on. Originally I expected a 1:1 relationship between pcp_block (id in your table) AND entity_table+entity_id AND target_entity_table+target_entity_id. I expected this because each event / each contribution page is linked to one PCP block via the UI (PCP tab). Obviously that's not the case in your site's data.

Does your site actually have civicrm_event rows with the IDs listed under entity_id column?
Code: [Select]
SELECT id, title, is_active from civicrm_event
Does your site actually have civicrm_contribution_page rows with the IDs listed under target_entity_id column?
Code: [Select]
SELECT id, title, is_active from civicrm_contribution_page
... we could try this line instead of GROUP BY block.id
Code: [Select]
GROUP BY target_entity_type, target_entity_id
BUT it seems like you may have multiple online contribution pages with the same title (MSU Gran Fondo) or ???
 

Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • User Dashboard

This forum was archived on 2017-11-26.