Cannot reproduce User Registration

Ignite

Member
Hi, i converted one of my sites from IPB 4.2 into my site XF2 and turned off registration.

Everytime i goto the registration option now it crashes? o.o

  • TypeError: Argument 1 passed to XF\Repository\User::getUsersByIdsOrdered() must be of the type array, string given
  • src/XF/Repository/User.php:284
  • Generated by: xxxxx
  • Feb 4, 2018 at 12:46 AM

Stack trace
Code:
#0 [internal function]: XF\Repository\User->getUsersByIdsOrdered('Sauce')
#1 src/XF/Template/Templater.php(936): call_user_func_array(Array, Array)
#2 internal_data/code_cache/templates/l1/s0/admin/option_template_registrationWelcome.php(10): XF\Template\Templater->method(Object(XF\Repository\User), 'getUsersByIdsOr...', Array)
#3 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#4 src/XF/Template/Templater.php(1320): XF\Template\Templater->renderTemplate('option_template...', Array)
#5 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(217): XF\Template\Templater->includeTemplate('admin:option_te...', Array)
#6 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#7 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(478): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#8 src/XF/Template/Templater.php(659): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#9 internal_data/code_cache/templates/l1/s0/admin/option_list.php(64): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#10 src/XF/Template/Templater.php(1246): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#11 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#12 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#14 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#16 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#17 src/XF.php(328): XF\App->run()
#18 admin.php(13): XF::runApp('XF\\Admin\\App')
#19 {main}

Request state
Code:
[/B]
[B]array(4) {
  ["url"] => string(47) "/admin.php?options/groups/usersAndRegistration/"
  ["referrer"] => string(50) "https://xxxxxxxxx/admin.php?options/groups/seo/"
  ["_GET"] => array(1) {
    ["options/groups/usersAndRegistration/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

 
I'm not 100% certain as I don't have the code in front of me right now, but I think this code is new in 2.0.2 and that error looks like it could be the result of a bug in that code, so there's no particular fix or workaround we can suggest right now, but we'll look into it soon.
 
The only possible workaround I can think of right now is to try running the following query:
SQL:
UPDATE xf_option
SET option_value = '[]'
WHERE option_id = 'registrationWelcome'
After that, you'd need to go to any other options page, perhaps such as Basic Board Information and toggle the "Board active" option off and then back on, so the option cache is rebuilt.

I think you'll then be able to access the User registration options page.
 
The only possible workaround I can think of right now is to try running the following query:
SQL:
UPDATE xf_option
SET option_value = '[]'
WHERE option_id = 'registrationWelcome'
After that, you'd need to go to any other options page, perhaps such as Basic Board Information and toggle the "Board active" option off and then back on, so the option cache is rebuilt.

I think you'll then be able to access the User registration options page.
This worked! Thank you so much!!!!! Do you know why this happens? Is this because of the ipb convert?
 
I wasn’t able to reproduce it myself so we’ll need to do some testing.

Possibly, but I’m not certain how yet.
 
Despite several attempts, I can't currently reproduce this and we haven't had any other reports. So we'll keep an eye on this but there doesn't seem to be anything to change right now.
 
Back
Top Bottom