Bug Google Analytics Error

Discussion in 'Support & Feedback' started by harrisunderwork, Sep 11, 2009.

  1. #1
    After granting DP to access my google analytics data, I saw one error.

    Warning: Invalid argument supplied for foreach() in [path]/includes/class_analytics.php on line 52
    
    Warning: Invalid argument supplied for foreach() in [path]/analytics.php on line 69
    PHP:
    I think you need to check variable for array before passing to foreach Shawn. ;)
     
    harrisunderwork, Sep 11, 2009 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Yeah... someone else reported that too. I'm purposely not suppressing it so I can find someone else (like you! lol) reporting it so I can figure out why the user would seemingly have no profiles.

    Did you link it to a Google Account that has no Google Analytics stuff to view maybe?
     
    digitalpoint, Sep 11, 2009 IP
  3. harrisunderwork

    harrisunderwork Well-Known Member

    Messages:
    1,005
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    135
    #3
    Well I have the profiles in it but the data is still not ready in it, means I have added sites today.

    What output are you expecting from the api when there is no api, perhaps you should check the format of output and then proceed the script :)

    EDIT :

    Oke got it shawn, I was logged with another account, I signed out back and signed with one having analytics account and then again used the above option.

    This time no problem.

    Perhaps after you have access to google account, do you have a way to check if I have analytics account ?
     
    harrisunderwork, Sep 11, 2009 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    Yeah... I just changed it so that if someone links a Google Account account with no Analytics profiles available to it (for whatever reason) it just says, "Sorry... this Google Account has no Analytics profiles... try again" (or something along those lines).
     
    digitalpoint, Sep 11, 2009 IP
  5. harrisunderwork

    harrisunderwork Well-Known Member

    Messages:
    1,005
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    135
    #5
    Just a sec will report you back in few minutes.

    EDIT : Working fine now :D

    Great job :)
     
    harrisunderwork, Sep 11, 2009 IP
  6. Overclock099

    Overclock099 Notable Member

    Messages:
    3,648
    Likes Received:
    122
    Best Answers:
    0
    Trophy Points:
    280
    #6
    Is still problem.. My analytic is not running.. Also find error page where only have this line..


    Fatal error: Cannot use string offset as an array in /home/sites/forums.digitalpoint.com/web/includes/class_analytics.php on line 55 
    Code (markup):
     
    Overclock099, Sep 11, 2009 IP
  7. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #7
    Go ahead and try it now. Looks like the vBulletin XML parser treats stuff slightly differently when there's only 1 item (only 1 profile in your case).
     
    digitalpoint, Sep 11, 2009 IP
  8. Overclock099

    Overclock099 Notable Member

    Messages:
    3,648
    Likes Received:
    122
    Best Answers:
    0
    Trophy Points:
    280
    #8
    Work fine now..thanks brother..
     
    Overclock099, Sep 12, 2009 IP