Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I had previously had this module working correctly but now I have the following error appearing with both the API config and also the reports. In addition the views are no longer present.
Any pointers would be most welcome.
Undefined property: stdClass::$defaultPage in google_analytics_api_admin() (line 55 of /sites/all/modules/google_analytics_reports/google_analytics_api.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#17 | google_analytics_reports-stdclass_defaultpage-1984506-17.patch | 637 bytes | Plazik |
#13 | google_analytics_reports-1984506-13.patch | 661 bytes | hadsie |
Comments
Comment #1
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI can confirm this too
Comment #2
deanflory CreditAttribution: deanflory commentedI too am getting:
Comment #3
mmenavas CreditAttribution: mmenavas commentedOn google_analytics_api.pages.inc, line 55, it is assumed the optional 'Default Page' setting has a value (to edit this setting go to google.com/analytics, click on Admin, select account, select property, select profile, and click on the Profile Settings tab).
Perhaps the existence of $current_profile->defaultPage should be checked before being used in variable_set.
Comment #4
benchesters CreditAttribution: benchesters commentedHi, I don't understand what you mean by this. You are saying alter which setting within GA?
Comment #5
deanflory CreditAttribution: deanflory commentedTotal guesss: maybe they're saying you should just go to that GA Profile Settings tab and just save it, so it creates a value.
Comment #6
millionleaves CreditAttribution: millionleaves commentedNot sure it makes sense to check for a default page.
The default page value in GA is for sites that have an "index.php" page which can be accessed separately from the root of the site (and, potentially, index and tracked as a separate page).
On all of my sites, the home page identified in Site Configuration is always 301 redirected to /, so it seems unnecessary to provide a default page in the GA profile settings.
Comment #7
chertzogThis does a check for the default page and if not found, sets it to "/".
Comment #8
kingfisher64 CreditAttribution: kingfisher64 commentedCan confirm this is still popping up using the latest dev versions of the module from September 30.
Any suggestions?
Comment #8.0
kingfisher64 CreditAttribution: kingfisher64 commentedtypo
Comment #9
cblanglois CreditAttribution: cblanglois commentedHas this been resolved, i'm currently facing the same issue.
Comment #10
kevinsullivan CreditAttribution: kevinsullivan commentedI'm also seeing it on my site.
Comment #11
kingfisher64 CreditAttribution: kingfisher64 commentedTo the current maintainer, can you please suggest how to fix this. It's been 3 months since my last request and others are getting this as well.
Many thanks for your time.
Comment #12
twatters963 CreditAttribution: twatters963 commentedI have the same problem as well. Any help would be very appreciated!
Comment #13
hadsie CreditAttribution: hadsie commentedHere's a patch that does pretty much what was suggested in #7
Comment #14
manyk CreditAttribution: manyk commentedEven more ... the line 55 could be turned into this
Comment #15
manyk CreditAttribution: manyk commentedComment #16
JadH CreditAttribution: JadH commentedApplying patch from 13 fixes the issue
Comment #17
Plazik CreditAttribution: Plazik commentedPatch from #13 and #14.
Comment #19
Plazik CreditAttribution: Plazik commentedComment #20
Plazik CreditAttribution: Plazik commented