Fixed An exception occurred: [TypeError] Argument 1 passed to XF\Repository

KSA

Well-known member
Affected version
2.1
I tried to disable email confirmation and get this error. Now if I click on user registration in admin control I can not access it. I get this error. I did the upgrade yesterday from 2.0 to 2.1.

An exception occurred: [TypeError] Argument 1 passed to XF\Repository\User::getUsersByIdsOrdered() must be of the type array, string given in src/XF/Repository/User.php on line 285

  1. XF\Repository\User->getUsersByIdsOrdered()
  2. call_user_func_array() in src/XF/Template/Templater.php at line 978
  3. XF\Template\Templater->method() in internal_data/code_cache/templates/l7/s0/admin/option_template_registrationWelcome.php at line 10
  4. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1294
  5. XF\Template\Templater->renderTemplate() in src/XF/Template/Templater.php at line 1367
  6. XF\Template\Templater->includeTemplate() in internal_data/code_cache/templates/l7/s0/admin/option_macros.php at line 219
  7. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 694
  8. XF\Template\Templater->callMacro() in internal_data/code_cache/templates/l7/s0/admin/option_macros.php at line 480
  9. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 694
  10. XF\Template\Templater->callMacro() in internal_data/code_cache/templates/l7/s0/admin/option_list.php at line 79
  11. XF\Template\Templater->{closure}() in src/XF/Template/Templater.php at line 1294
  12. XF\Template\Templater->renderTemplate() in src/XF/Template/Template.php at line 24
  13. XF\Template\Template->render() in src/XF/Mvc/Renderer/Html.php at line 48
  14. XF\Mvc\Renderer\Html->renderView() in src/XF/Mvc/Dispatcher.php at line 418
  15. XF\Mvc\Dispatcher->renderView() in src/XF/Mvc/Dispatcher.php at line 400
  16. XF\Mvc\Dispatcher->renderReply() in src/XF/Mvc/Dispatcher.php at line 360
  17. XF\Mvc\Dispatcher->render() in src/XF/Mvc/Dispatcher.php at line 53
  18. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  19. XF\App->run() in src/XF.php at line 390
  20. XF::runApp() in admin.php at line 13
 
This shouldn't be a blocking error.

If it is blocking you from accessing the page then that suggests your account may have debug mode or development mode enabled in src/config.php. Perhaps it is enabled for your IP address only or similar?

Either way, disable that and it should allow you to access the page again. You may then be able to make changes to the values on that page so it no longer errors.

As for the bug report itself, we'll need to look into this.
 
This shouldn't be a blocking error.

If it is blocking you from accessing the page then that suggests your account may have debug mode or development mode enabled in src/config.php. Perhaps it is enabled for your IP address only or similar?

Either way, disable that and it should allow you to access the page again. You may then be able to make changes to the values on that page so it no longer errors.

As for the bug report itself, we'll need to look into this.

Neither debug nor development mode are enabled.
 
Ok.

Please run this query to fix the problem for now:
SQL:
UPDATE xf_option
SET option_value = default_value
WHERE option_id = 'registrationWelcome';
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
In some option templates, protect against invalid user ID data
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom