• Resolved Endymion00

    (@endymion00)


    After updating, all the markers on the maps disappeared.

    Checked the wp-google-maps folder and all of the #markers.xml files were gone. Restored them from backup and the maps have their markers again.

    This is why it’s not a good idea to store data files within the plugin folder itself. It’s just not safe. They really should have a folder in the uploads or a custom wp-content sub-folder.

    https://wordpress.org/plugins/wp-google-maps/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author WPGMaps

    (@wpgmaps)

    Hi there
    Point taken and agreed on.

    We recently fixed a bug that caused all XML files to be updated on each pageload of the map (ugly, I know). We then resulted in checking to see if the marker file existed, and if not, only then creating the marker file so that duplication would not exist. I think what’s happened here is that there may be a conflict with trying to find out if the file exists or not.

    We’ll be releasing a new version soon where the marker files are stored in the uploads folder.

    In the meantime, please can you contact me on nick@wpgmaps.com so I can debug the issue and get your map working?

    Kind regards
    Nick

    Thread Starter Endymion00

    (@endymion00)

    Yeah, I was the one that reported the XML files being updated constantly issue.

    Upgrading to 6.0.2 was fine, but from 6.0.2 to 6.0.4 is when the files disappeared. Also running Pro if that matters.

    Since I added the xml files back myself, the maps are currently working again so I don’t currently need assistance there.

    Plugin Author WPGMaps

    (@wpgmaps)

    Hi
    In version 6.0.5 we now make use of the uploads directory to store the markers in. Please update and let me know how it goes?

    Thanks again for pointing this out.

    Kind regards
    Nick

    Thread Starter Endymion00

    (@endymion00)

    Upgrading to 6.0.5 deleted all the maker xml files again and did not create anything in the uploads folder. It seems that you’re not checking for pre-existing files at the old location and generating the new location. I suggest there should be code that checks for existing in-plugin files and if found creates the new location and moves them there, then maybe sets a preference so it doesn’t bother checking the old location in the future. You may have that already, but if the markers are being deleted before that runs, it doesn’t get a change to check. Also, it should check that the upload folder exists and if not, create it.

    After looking at your php code to determine the correct location, I created the “wp-google-maps” folder in my uploads and copied the xml files from my backup and have my maps working again.

    Plugin Author WPGMaps

    (@wpgmaps)

    We do check if the file exists before trying to create it. We also do the same for the folder. Something on your server must be stopping our plugin (permissions) from creating folders.

    Who do you host with? I’d like to create an account with them so that I can test.

    Kind regards
    Nick

    Thread Starter Endymion00

    (@endymion00)

    I host my own server, and I’m not seeing anything blocking it from a mod_security standpoint nor do I see any php errors.

    Under 6.0.4, if I deactivated the plugins and removed the marker xml files, reactivating the plugin would regenerate them. That does not happen with 6.0.5. Upgrading to 6.0.5 does not initially create the uploads/wp-google-maps/cache folder, however deactivating and reactivating does create the folders, but without the markers.

    I did take a look at wpGoogleMaps.php and compared the 6.0.4 version to the 6.0.5 version.

    Under 6.0.4 at line 201, you have:
    if (!wpgmaps_check_permissions()) { wpgmaps_permission_warning(); } else { wpgmaps_update_all_xml_file(); }

    That is missing in 6.0.5, and if I add it back into the 6.0.5 version, deactivating and reactivating now generates the markers.

    So, I’m thinking when it upgrades and re-activates it’s not triggering the marker generation because it’s not being told to. Not sure why they weren’t being generated when I upgraded from 6.0.2 to 6.0.4 however. Maybe the wpgmaps_activate function is not being called at all during the upgrade process for the last few versions. That would explain the uploads/wp-google-maps/cache folders not be created when the plugin updates under version 6.0.5 and could explain the loss of the markers in the recent versions even though the generation code is in the function for wpgmaps_activate in 6.0.4 and earlier.

    Looking further and comparing 6.0.2 to 6.0.4 I see that the function wpgmaps_update_db_check() at line 3783 has wpgmaps_update_all_xml_file() commented out in 6.0.4 and 6.0.5 where it was not in 6.0.2. Same at the top of the activate function, where wpgmaps_update_all_xml_file(); is commented out in 6.0.4 but not in 6.0.2.

    So, I think these commented out lines / missing lines are the root of the upgrade issues.

    I’m having this problem as well, have 6.0.5 installed, running my wordpress instance on pressable.

    Problem resolved for me – it resolved when I updated my Pro plugin to 5.17 (I think?)

    Plugin Author WPGMaps

    (@wpgmaps)

    dlnsf, you’re spot on.

    Endymion, thank you for your amazing feedback. We’re about to launch 6.0.6 which fixes this. Thank you for all your help!

    Kind regards
    Nick

    Thread Starter Endymion00

    (@endymion00)

    Tested a 6.0.4 to 6.0.6 upgrade. It didn’t automatically create the upload folder items nor the markers in it. However this time deactivating and reactivating the plugin did create the folders and markers. So it seems the upgrade process still needs to trigger the folder and marker generation.

    Plugin Author WPGMaps

    (@wpgmaps)

    OK I think we’ve got it right now in version 6.0.7. Just tested it and it seems to do the trick. Please confirm?

    Kind regards
    Nick

    Thread Starter Endymion00

    (@endymion00)

    Yes, upgrading from 6.0.4 to 6.0.7 now creates the files in the new uploads locations, fixing the issue.

    One minor detail that may or may not be considered even an issue. Upgrading from 6.0.6 to 6.0.7 regenerates the xml files in the uploads folder when it doesn’t really need to anymore… but it’s not really hurting anything, just thought I’d point that out in case you wanted to check for their existance first before regenerating on upgrade.

    Otherwise it’s back to a good upgrade state.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Update to 6.0.4 wiped out all the markers’ is closed to new replies.