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 »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • No Campaigns Showing up in Campaign dashboard
Pages: [1]

Author Topic: No Campaigns Showing up in Campaign dashboard  (Read 2290 times)

ibhola

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal v7.22
  • MySQL version: 5.5.23
  • PHP version: 5.3.27
No Campaigns Showing up in Campaign dashboard
December 13, 2011, 07:23:23 pm
I have created 2 new campaigns and they are not showing up in the campaign dashboard so I cannot edit them.
We are new users to CIVICRM and it is in the trial phase. Version 4.05 with Joomla 1.7
Using IIS 7
Any help would be greatly appreciated

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: No Campaigns Showing up in Campaign dashboard
December 14, 2011, 12:00:17 am
Looks like a small bug, ( which will replicate only if error_reporting = E_ALL )

Can u please try following patch
Code: [Select]
Index: CRM/Campaign/Page/DashBoard.php
===================================================================
--- CRM/Campaign/Page/DashBoard.php (revision 37838)
+++ CRM/Campaign/Page/DashBoard.php (working copy)
@@ -207,6 +207,7 @@
         //get the campaigns.
         $campaigns = CRM_Campaign_BAO_Campaign::getCampaignSummary( $params );
         if ( !empty( $campaigns ) ) {
+            $config = CRM_Core_Config::singleton( );
             $campaignType    = CRM_Campaign_PseudoConstant::campaignType( );
             $campaignStatus  = CRM_Campaign_PseudoConstant::campaignStatus( );


Let me know is it working or not!

Rajan

ibhola

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal v7.22
  • MySQL version: 5.5.23
  • PHP version: 5.3.27
Re: No Campaigns Showing up in Campaign dashboard
December 14, 2011, 07:05:28 am
Yes it did work!!
Thanks so much for your help!

The only difference in the code you supplied was the line
 ********   $config = CRM_Core_Config::singleton( );        **************
Would you mind explaining why that would make a difference. (I am new to PHP and would like to learn more)

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: No Campaigns Showing up in Campaign dashboard
December 14, 2011, 09:12:19 pm
'*' might came while coping code to ur editor, I am not sure!
Ideally here is the simple doc for applying patches while working with the svn, http://wordaligned.org/articles/svn-help-patch.
But for few line of patch like above, u can do it manually.

Thanks for noticing this bug, I have committed in CiviCRM core as a minor fix :)

Rajan

ibhola

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal v7.22
  • MySQL version: 5.5.23
  • PHP version: 5.3.27
Re: No Campaigns Showing up in Campaign dashboard
December 15, 2011, 09:02:45 am
Sorry, for not being clear
I wanted to find out why the line of code made a difference. I included the *** just to highlight the line:

$config = CRM_Core_Config::singleton( );

Thanks again!

Rajan Mayekar

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 20
    • Rajan's Blogs
Re: No Campaigns Showing up in Campaign dashboard
December 15, 2011, 08:09:41 pm
Oh, ok!

If you can see the function code ( where we have included this line ), this function is using "$config" variable but which is undefined in that function scope which result to generate warnings and break out the requested ajax output.
That why we have defined $config, this before using it!
Quote
$config = CRM_Core_Config::singleton( );

Rajan

ibhola

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal v7.22
  • MySQL version: 5.5.23
  • PHP version: 5.3.27
Re: No Campaigns Showing up in Campaign dashboard
December 17, 2011, 01:50:51 pm
thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • No Campaigns Showing up in Campaign dashboard

This forum was archived on 2017-11-26.