doublesecretagency / craft-googlemaps

Google Maps plugin for Craft CMS - Maps in minutes. Powered by the Google Maps API.
https://plugins.doublesecretagency.com/google-maps/
Other
10 stars 8 forks source link

Trouble upgrading from Smart Maps #86

Closed AdamChlan closed 1 year ago

AdamChlan commented 1 year ago

I have a Craft site, running Smart Maps 3.3.6, and Craft 3.8.10.2, and I'm attempting to upgrade to Google Maps, prior to doing a Craft v4 upgrade. I'm running into a problem when I try to install the plugin. When I do so, I get the following message in the terminal. I'm curious if you have any troubleshooting recommendations, or if perhaps there is a better upgrade path I could take.

*** installing google-maps
Exception: Setting unknown property: doublesecretagency\googlemaps\records\Address::name (/var/www/html/vendor/yiisoft/yii2/base/Component.php:209)
#0 /var/www/html/vendor/yiisoft/yii2/db/BaseActiveRecord.php(322): yii\base\Component->__set('name', NULL)
#1 /var/www/html/vendor/craftcms/cms/src/db/ActiveRecord.php(54): yii\db\BaseActiveRecord->__set('name', NULL)
#2 /var/www/html/vendor/yiisoft/yii2/BaseYii.php(558): craft\db\ActiveRecord->__set('name', NULL)
#3 /var/www/html/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(doublesecretagency\googlemaps\records\Address), Array)
#4 /var/www/html/vendor/doublesecretagency/craft-googlemaps/src/migrations/FromSmartMap.php(185): yii\base\BaseObject->__construct(Array)
#5 /var/www/html/vendor/doublesecretagency/craft-googlemaps/src/migrations/FromSmartMap.php(45): doublesecretagency\googlemaps\migrations\FromSmartMap::_migrateAddressFieldData()
#6 /var/www/html/vendor/doublesecretagency/craft-googlemaps/src/migrations/Install.php(37): doublesecretagency\googlemaps\migrations\FromSmartMap::update()
#7 /var/www/html/vendor/craftcms/cms/src/db/Migration.php(53): doublesecretagency\googlemaps\migrations\Install->safeUp()
#8 /var/www/html/vendor/craftcms/cms/src/db/MigrationManager.php(232): craft\db\Migration->up(true)
#9 /var/www/html/vendor/craftcms/cms/src/base/Plugin.php(140): craft\db\MigrationManager->migrateUp(Object(doublesecretagency\googlemaps\migrations\Install))
#10 /var/www/html/vendor/craftcms/cms/src/services/Plugins.php(536): craft\base\Plugin->install()
#11 /var/www/html/vendor/craftcms/cms/src/console/controllers/PluginController.php(128): craft\services\Plugins->installPlugin('google-maps')
#12 [internal function]: craft\console\controllers\PluginController->actionInstall('google-maps')
#13 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#14 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#15 /var/www/html/vendor/yiisoft/yii2/console/Controller.php(182): yii\base\Controller->runAction('install', Array)
#16 /var/www/html/vendor/craftcms/cms/src/console/Controller.php(221): yii\console\Controller->runAction('install', Array)
#17 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): craft\console\Controller->runAction('install', Array)
#18 /var/www/html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('plugin/install', Array)
#19 /var/www/html/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('plugin/install', Array)
#20 /var/www/html/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('plugin/install', Array)
#21 /var/www/html/vendor/craftcms/cms/src/console/Application.php(118): yii\console\Application->handleRequest(Object(craft\console\Request))
#22 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#23 /var/www/html/craft(23): yii\base\Application->run()
#24 {main}
*** failed to install google-maps.

Failed to run php ./craft plugin/install google-maps: exit status 1
lindseydiloreto commented 1 year ago

Hi @AdamChlan, sorry for the delay! I'm assuming you are updating to v4.1.9 (the last compatible with Craft 3).

It looks like this migration may have gotten skipped somehow. That would have added the name column to the Address table.

Let's connect on Discord, we can work through it together in real-time. If there's anything noteworthy that may impact others, I'll report it back on this thread. 👍