WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] Broken if WordPress is installed in a sub-directory (24 posts)

  1. Kenneth Feldman
    Member
    Posted 1 year ago #

    Broken if WordPress is installed in a sub-directory.

    All of my WP installs are in subdirectories -- and when I click the SETTINGS link for this plugin, the url delivered to the browser ignores the subdirectory -- resulting in a page-not-found error.

    The plugin is likely assuming that the path to WP starts with the domain -- but should instead check to see what WP is reporting as the path, as set in the General Settings.

    http://wordpress.org/extend/plugins/google-analyticator/

  2. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    We are investigating this now and will update you as soon as we have an answer for you.

    Thanks or taking the time to bring this to our attention.

    Cheers,
    Troy.

  3. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Kenneth

    I've found this bug and corrected it, it shall be released in a future release.

    You can still access the settings via the Settings -> Google Analytics tab on the admin menu.

    Cheers,
    Ben

  4. Kenneth Feldman
    Member
    Posted 1 year ago #

    Wow! FAst.

    Thanks!

  5. Jason Kemp
    Member
    Posted 1 year ago #

    This is still broken. When we go to edit the settings like so - it can't find the file because WordPress is installed in a sub directory. It can not be edited in settings because the path is still wrong.

    'wp-admin/options-general.php?page=google-analyticator.php'

    To edit add your subdirectory name in front of the /wp-admin/ part

    'subdirectoryname/wp-admin/options-general.php?page=google-analyticator.php'

    OTOH just easier to delete this plugin and use one that works

  6. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Jason,

    What link - there are a few. And I believe I have checked all references.

    I am developing on localhost/ga/ (a sub dir) and not getting any 404 errors.

    Ben

  7. Jason Kemp
    Member
    Posted 1 year ago #

    The link was on the settings but now appears to be fixed, Have just reinstalled the latest version on one of my sites and it worked this time but was not earlier in the day so thank you.

  8. PSYCHOMACHIA
    Member
    Posted 1 year ago #

    I also receive error_messages as both members above! The plug doesn't work for wp installed in subdirectories!

    Error_message: There was an Analytics API service error 400:Error fetching OAuth2 access token, message: 'invalid_grant'

    No Analytics account selected. Double check you are authenticated with Google on Google Analyticator's settings page and make sure an account is selected.

    Settings error_message: There was an Analytics API service error 400:Error fetching OAuth2 access token, message: 'invalid_grant'

  9. Jason Kemp
    Member
    Posted 1 year ago #

    OK - Correction / The update worked for a site where the sub directory was called blog.

    It doesn't work on any of the the other sites where I have tired to reinstall it - most of those have a sub directory called /wordpress/ these sites do not work.

    I am wondering if when the plugin is updated it is missing some of the newer files. I will use FTP to delete the plugin completely and then try a fresh install.

    Have now tested that scenario and it doesn't work either so this is unresolved

  10. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Guys,

    please upgrade to 6.3.3 - you should be set!

    You wont have to re-auth or anything like that.

    Hope this fixed you up!

    Cheers,

    Ben

  11. Jason Kemp
    Member
    Posted 1 year ago #

    Still getting the same 404 error on that version.

    Try to go to settings and it is looking for the wrong place still

    'wp-admin/options-general.php?page=ga_activate'

    Deactivate works though as it has the correct path if that is any help.

    'wordpress/wp-admin/plugins.php?deactivate=true&plugin_status=all&paged=1&s='

  12. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Ah. One spot missed.

    For now - can you just update line 148 to

    wp_redirect( admin_url('options-general.php?page=ga_activate') );

    rather than the bloginfo()...

    Just to confirm - and we'll include in a future release

    Ben

  13. blinovitch
    Member
    Posted 1 year ago #

    Ben, updating line 148 seems to work for me. I was able to input the activation code, see the control panel, etc.

  14. Annie83
    Member
    Posted 1 year ago #

    I also had the same problem (that is: site in a subdomain, no acces to Google Analyticator's settings) and the newest update didn't fix it. But I tried to update line 148 manually (as suggested above by VideoUserManuals) and hereafter Google Analyticar started working perfectly. Finally!!! :)

  15. Jason Kemp
    Member
    Posted 1 year ago #

    Ok - editing line 148 has worked. Have updated 3 sites with no issues. I'd say add to future release ASAP.

  16. PSYCHOMACHIA
    Member
    Posted 1 year ago #

    Updated to 6.3.3 but still receive errormessage: There was an Analytics API service error 400:Error fetching OAuth2 access token, message: 'invalid_grant'
    Tried to Deauthorize & Reset Google Analyticator....still receive an identical errormessage!
    How and where do I find the line 148 to ad the code: wp_redirect( admin_url('options-general.php?page=ga_activate') );
    Please reply ASAP...thanks a lot for the inconvenience...! If this maybe the way to resolve the issue...why don't you release a complete update?, which contains the missing piece of code?

  17. Jason Kemp
    Member
    Posted 1 year ago #

    Hi Psychomachia

    BTW - you need to download a fresh copy of the plugin to your system so you can edit the file. Here are the steps from there

    1. The file is called google-analyticator.php
    2. Use something like textmate or another text editor that you prefer which shows numbered lines in that file.
    3. Save the file and then rezip the googleanalyticator into a zip file. Needs to be with the same name as the file that downloads from main WordPress repository. ( so you will need to move or delete the earlier zip version of that file) so new edited version should be called google-analyticator.zip
    4. Deactivate and delete the old version of ga in your plugin section.
    5. Use add new plugins, and upload to the edited zip version of ga plugin.
    6. Activate the edited plugin.
    7. Go to settings - (while logged into google analytics on that system) plugin will ask you to authorise and then give you some extra code in a line which you copy and paste - then you should be all good.

  18. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    We will push up an update for this within 24hrs. Just waiting to see if there are any other new bugs found so we can group them into one release. Don't want to pester other users with a series of updates :)

    Sorry for missing that one line - needless to say, I've checked 10 times and haven't missed anywhere else!

    Ben

  19. PSYCHOMACHIA
    Member
    Posted 1 year ago #

    Hi Jason! Thanks for replying ASAP! I'll try to follow your guidelines and report back if there may be anykind of errormessages! Thanks!

  20. PSYCHOMACHIA
    Member
    Posted 1 year ago #

    The plugin still doesn't work? Can't spend more time, so I'll wait with installing it until a future release has solved the issue with wp in subdirectories!

  21. Jason Kemp
    Member
    Posted 1 year ago #

    Hi Psychomachia,

    It works for me on 34 sites so far - maybe try deleting the old version and reinstalling the latest one just in case there is some old files stuck in there :)

    Having tested extensively I confirm this is resolved

  22. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your help on this on Jason. Much appreciated

    Ben

  23. fcassad
    Member
    Posted 1 year ago #

    When I try to download a "new" (I had to delete the previous) google analyticator it will not install because it sees the ga folder in my home directory. Do i need to delete that or can I get that into my "installed plugins"?

  24. Jason Kemp
    Member
    Posted 1 year ago #

    @fcassad if you use auto upgrade then the old version will be deactivated and removed.

    If you can't use auto upgrade you should ask your host why not.

    Uploading any new copy of a plugin will fail if that folder is already present so you should deactivate and delete the old version manually first ( under the plugins section -assuming you are an admin) the folder should be called google-analyticator (and not ga)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic