• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Resolved Upgrade Error 1.2.0 - current

thelaw

New Member
AMS Premium
CAS Premium
IMS Premium
LD Premium
SC Premium
I'm testing the upgrade process and have XF down pat but not AMS yet. The below is a test site with a test database. I know what the error is and not sure why its happening. I do have debug enabled and it doesn't matter if the master is overwritten since it's on a test site.

Table 'attyny_newlaw2k.xf_xa_ams_category' doesn't exist - that is true. It's because the table that does exist is xf_nflj_ams_category - but when I renamed it from nflj to xa, I got the second error below it that the . :/ Hmmm....

XF\Db\Exception: MySQL statement prepare error [1146]: Table 'attyny_newlaw2k.xf_xa_ams_category' doesn't exist in src/XF/Db/AbstractStatement.php at line 230
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 198
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 41
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 56
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
XF\Db\AbstractAdapter->query() in src/XF/Mvc/Entity/Finder.php at line 1430
XF\Mvc\Entity\Finder->fetch() in src/addons/XenAddons/AMS/Permission/CategoryPermissions.php at line 34
XenAddons\AMS\Permission\CategoryPermissions->getContentTree() in src/XF/Permission/TreeContentPermissions.php at line 23
XF\Permission\TreeContentPermissions->setupBuildTypeData() in src/XF/Permission/AbstractContentPermissions.php at line 48
XF\Permission\AbstractContentPermissions->setupBuildData() in src/XF/Permission/AbstractContentPermissions.php at line 21
XF\Permission\AbstractContentPermissions->__construct() in src/XF/Permission/Builder.php at line 116
XF\Permission\Builder->getContentHandler() in src/XF/Permission/Builder.php at line 85
XF\Permission\Builder->getContentHandlers() in src/XF/Permission/Builder.php at line 148
XF\Permission\Builder->rebuildCombinationContent() in src/XF/Permission/Builder.php at line 142
XF\Permission\Builder->rebuildCombination() in src/XF/Job/PermissionRebuild.php at line 69
XF\Job\PermissionRebuild->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 42
XF\Job\AbstractRebuildJob->run() in src/XF/Job/PermissionRebuild.php at line 25
XF\Job\PermissionRebuild->run() in src/XF/Job/Manager.php at line 260
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 202
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 118
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 122
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 352
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
XF\App->run() in src/XF.php at line 524
XF::runApp() in admin.php at line 13


InvalidArgumentException: Table 'xf_nflj_ams_category' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38
  1. XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 228
  2. XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 168
  3. XF\Db\SchemaManager->renameTable() in src/addons/XenAddons/AMS/Setup.php at line 462
  4. XenAddons\AMS\Setup->upgrade2000011Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 124
  5. XenAddons\AMS\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 73
  6. XenAddons\AMS\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 597
  7. XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 352
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  12. XF\App->run() in src/XF.php at line 524
  13. XF::runApp() in admin.php at line 13
Now this:

InvalidArgumentException: Table 'xf_nflj_ams_article' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38
  1. XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 228
  2. XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 168
  3. XF\Db\SchemaManager->renameTable() in src/addons/XenAddons/AMS/Setup.php at line 462
  4. XenAddons\AMS\Setup->upgrade2000011Step1() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 124
  5. XenAddons\AMS\Setup->upgradeStepRunner() in src/XF/AddOn/StepRunnerUpgradeTrait.php at line 73
  6. XenAddons\AMS\Setup->upgrade() in src/XF/Admin/Controller/AddOn.php at line 597
  7. XF\Admin\Controller\AddOn->actionUpgrade() in src/XF/Mvc/Dispatcher.php at line 352
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 259
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 115
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 57
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2487
  12. XF\App->run() in src/XF.php at line 524
  13. XF::runApp() in admin.php at line 13
 
I tried upgrading first to 1.6.8 but apparently there are a whole bunch of tables that don't exist:

xf_nflj_ams_article, xf_nflj_ams_article_read, xf_nflj_ams_article_reply_ban, etc. I'm not sure how I'm missing so many tables.... view, watch, now the author tables. I was creating empty dummy tables with a dummy column as such but there are way too many to create.

create table xf_nflj_ams_article_view (testy int);

And as I continue to run through the setup it's like whack a mole.

InvalidArgumentException: Table 'xf_nflj_ams_author_watch' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38
 
Last edited:
Solved. I went back to my old database and have no idea how a mysqldump might miss a few tables. but some were also missing but inconsequential.

create table xf_nflj_ams_article_reply_ban (testy int);

This one was never created. I upgraded to 1.8.6 and then copied the 2.x files with the xa folders/directories and ran the upgrade and it looks like we're good. Now that was weird...

I am bummed I'll have to do some work, including readding in my headers that aren't built into this editor to create h2, h3, and h4 in articles instead of just bolded headlines. This is not an AMS thing but a general text editor thing and need to have XF make the replacements for the [h2] to sub out for the proper one in <>
 
I did notice that the hundreds of articles I had that were unapproved were approved during the upgrade. Wow.... lots of spam....

Home page also needs to be completely reprogrammed as the AMS based home page I had was completely lost. I may end up using just the appearance manager to add in a tad of custom stuff but otherwise this is quite awesome. I can see this getting reset up by end of week... so now enough of my yapping. Back to work and shall return here when done!
 
Last edited:
So are you good to go now?

Home page also needs to be completely reprogrammed as the AMS based home page I had was completely lost. I may end up using just the appearance manager to add in a tad of custom stuff but otherwise this is quite awesome. I can see this getting reset up by end of week... so now enough of my yapping. Back to work and shall return here when done!
AMS has 2 index page types, standard, which is a paginated filterable listing of all article in the system OR Modular, which is a blank slate that you add Widgets to via the XF Widget System. AMS comes packed with several Widget Definitions allowing you to create an unlimited amount of unique AMS related widgets (its way more powerful than what I offered with AMS 1.x) and of course, you can add ANY Widget, not just AMS widgets, so you can use the Core XF HTML Widget to recreate most of those custom menus that you developed.

I did notice that the hundreds of articles I had that were unapproved were approved during the upgrade. Wow.... lots of spam....
Not sure how the heck that can happen! There is not a single line of code in the AMS installer (which handles the upgrades) that would change the STATE of a piece of content during an upgrade. The state ('visible', 'moderated', deleted') doesn't just change on its own, it has to be manually changed by a moderator.

There are also no AUTOMATED functions in any of my addons that change the STATE of a piece of content, the changing of content STATE is all handled MANUALLY via individual functions or In-line moderation functions. XF doesn't have any automated functions that would change the state of a piece of content either.

You will need to file a ticket if you want me to look into this for you (and I will need access to the site and database that you are testing these upgrades).

btw, I'd suggest cleaning up your Moderation Queue before upgrading to XF2 (at least get rid of all the known spam content).
 
Regarding the two index pages, thank you for making my life a TON easier this time around! :) The blank slate is awesome and it will only require minor customization as opposed to building it all from scratch with my own addons to drop content widgets around the page.

The moderation issue isn't your terrific coding - but thank you for the offer to review. It's likely the result of the same weirdness I experienced with upgrading XF in general, where I had all my forum permissions revert to "no" for some odd reason. You're spot on about the spam and the other content that should be cleaned before upgrading and advise everyone to have removed every addon (except for the ones being upgraded like AMS, etc.) that have data in them. I'll be doing all of that as prep for the plan. I've spent the week planning the linear sequence and process of the upgrade and migration of data, which requires some pit stops to migrate data from other addons at different levels of XF 2.x.

While I could have deleted this thread, I decided to leave it out so that others who might find hiccups can get self-help to their issues without pestering you, especially just a few days before the big game. :) After ensuring my AMS install had everything it should have had (fault here), I was actually surprised how smoothly it went.
 
While I could have deleted this thread, I decided to leave it out so that others who might find hiccups can get self-help to their issues without pestering you, especially just a few days before the big game
Thank you (even though this has not impacted me). This is a pet peeve of mine in many forums I participate in... way too often someone will post an issue and then eventually resolve it themself and then simply say "fixed".
Please (and yes, this is to all that may come across this).... if you have ran into an issue (even if it is one you shot yourself in the foot over - don't be embarrassed we have all been there before)... post the resolution and don't simply say "fixed". That does other users no good (and this is not restricted to Bob's add-ons).
 
Know the feeling. My advice to all - and this has happened with several addons - is to upgrade incrementally instead of expecting the installer to install all upgrades. For example, if you're using AMS 1.2, upgrade to 1.3, then 1.4, then 1.5, etc. While hypothetically a one shot 1.2 to 2.2 upgrade should work, more often than you'd think these upgrades can fail for a variety of reasons.
 
Back
Top