Cannot reproduce ErrorException: [E_NOTICE] Undefined index: user_selectable src/XF/Style.php:275

Affected version
2:0:1
Code:
#0 src/XF/Style.php(275): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/var/www/virtua...', 275, Array)
#1 src/XF/Pub/App.php(341): XF\Style->offsetGet('user_selectable')
#2 src/XF/Mvc/Dispatcher.php(280): XF\Pub\App->preRender(Object(XF\Mvc\Reply\Error), 'html')
#3 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Error), 'html')
#4 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}


Code:
array(4) {
  ["url"] => string(27) "/xfsoccer/matches/1422/info"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Did you just get this once? Can you reproduce it at the listed URL?

I don't see how this would happen unless there is something odd in the style cache.
 
I'm getting something similar upgrading from XFMG 1.01 to 2.0.2

The upgrade process failed three times through the ACP, but then seemed to work through the command line.

Two errors from the initial upgrade:

Code:
ErrorException: [E_NOTICE] Undefined index: album src/addons/XFMG/Setup.php:1934
Generated by: RobinHood Mar 1, 2018 at 10:33 AM
Stack trace
#0 src/addons/XFMG/Setup.php(1934): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home//...', 1934, Array)
#1 src/XF/AddOn/StepRunnerUpgradeTrait.php(122): XFMG\Setup->upgrade902000010Step26(Array)
#2 src/XF/AddOn/StepRunnerUpgradeTrait.php(71): XFMG\Setup->upgradeStepRunner(902000010, 26, Array, 902000032)
#3 src/XF/Admin/Controller/AddOn.php(437): XFMG\Setup->upgrade(Array)
#4 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', 'html', Object(XF\Mvc\ParameterBag), 'listAddOns', Object(XF\Admin\Controller\AddOn), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}
Request state
array(4) {
  ["url"] => string(31) "/admin.php?add-ons/XFMG/upgrade"
  ["referrer"] => string(55) "https://www..com/admin.php?add-ons/XFMG/upgrade"
  ["_GET"] => array(1) {
    ["add-ons/XFMG/upgrade"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["_xfProcessing"] => string(1) "1"
    ["continue"] => string(1) "1"
    ["confirm"] => string(1) "1"
    ["params"] => string(34) "{"step":26,"version_id":902000010}"
    ["count"] => string(2) "86"
    ["finished"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
  }
}

Code:
ErrorException: [E_NOTICE] Undefined index: media src/addons/XFMG/Setup.php:1941
Generated by: RobinHood Mar 1, 2018 at 10:33 AM
Stack trace
#0 src/addons/XFMG/Setup.php(1941): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home//...', 1941, Array)
#1 src/XF/AddOn/StepRunnerUpgradeTrait.php(122): XFMG\Setup->upgrade902000010Step26(Array)
#2 src/XF/AddOn/StepRunnerUpgradeTrait.php(71): XFMG\Setup->upgradeStepRunner(902000010, 26, Array, 902000032)
#3 src/XF/Admin/Controller/AddOn.php(437): XFMG\Setup->upgrade(Array)
#4 src/XF/Mvc/Dispatcher.php(249): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', 'html', Object(XF\Mvc\ParameterBag), 'listAddOns', Object(XF\Admin\Controller\AddOn), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#8 src/XF.php(328): XF\App->run()
#9 admin.php(13): XF::runApp('XF\\Admin\\App')
#10 {main}
Request state
array(4) {
  ["url"] => string(31) "/admin.php?add-ons/XFMG/upgrade"
  ["referrer"] => string(55) "https://www..com/admin.php?add-ons/XFMG/upgrade"
  ["_GET"] => array(1) {
    ["add-ons/XFMG/upgrade"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["_xfProcessing"] => string(1) "1"
    ["continue"] => string(1) "1"
    ["confirm"] => string(1) "1"
    ["params"] => string(34) "{"step":26,"version_id":902000010}"
    ["count"] => string(2) "86"
    ["finished"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
  }
}


After the command line upgrade, it seemed to work, but some images seem broken. I've been using the random media widget and there seems to be a fair few blanks.

1519907227118.webp

I tried the 'Rebuild media items' rebuild cache, but that didn't seem to do anything. Would running one of the other ones help?
 
If it was only those errors, it's really nothing to do with this thread, but we've patched that for the future.

Those errors wouldn't cause images to disappear though. Are you sure they were present before upgrading? Media images are just attachments in the attachment system like any other attachment so there's no reason for us to touch them.
 
Ahh sorry, I searched for e notice undefined index and this was the only result I found, so figured I put it here in case.

Re. The attachments, I’m not sure.
I never noticed blank thumbnails in the random media block on xf1, which is why it stood out after the upgrade.

The install did fail 3 times before I ran it via cli, could it be that the links are incorrect and didn’t update for a portion of them? Would it be worth trying any kind of rebuilds?

It’s not the end of the world if any of them are lost, but it just seems like there’s quite a few of them.
 
Hmm, so before I upgraded I decided to duplicate the site in case I had any issues.

I followed this guide.

I packaged up the cpanel account site using /scripts/pkgacct username

Then renamed the original account to another site name and domain.

Restored the backup, and upgraded the restored packaged up backup and that's what I've been working with. Everything seems to have been working fine up until now.

The broken media works fine on the original renamed site, so I'm wondering if perhaps some of the files got corrupted or didn't restore properly.

Are the media gallery attachments stored in the file system? Is there a directory I could copy over from the backup site?

Or is it not that simple? It looks like there's a 0 and a 1 folder full of .data files in the internal_data folder. Could I just copy them over?
 
Top Bottom