Topic on Extension talk:ImportUsers

Fatal exception of type "Error"

12
Wpinfold (talkcontribs)

I have a Mediawiki 1.35.4/Semantic Mediawiki 3.2.3 site and need to bring in 100 users. This looks like the perfect extension. I have been unable to make it work getting the error 'Fatal exception of type "Error"' when I bring in any CSV. Probably something I have missed - can someone suggest a path to fixing this?

Kghbln (talkcontribs)

You need to turn on error reporting and see what detailed error warning you are getting. Without this we do not have a chance to even point into a direction.

Anyhow chances are high that this extension no longer works. Admittedly my hobby coding knowledge is nowadays degraded towards 0 ability.

Wpinfold (talkcontribs)

Thank you this gave much better information

[0f3c6338f8756db35a0c151d] /Special:ImportUsers Error from line 134 of /var/www/html/extensions/ImportUsers/ImportUsers_body.php: Call to undefined method User::setPassword()


Backtrace:


#0 /var/www/html/extensions/ImportUsers/ImportUsers_body.php(40): SpecialImportUsers->analyzeUsers()

#1 /var/www/html/includes/specialpage/SpecialPage.php(600): SpecialImportUsers->execute()

#2 /var/www/html/includes/specialpage/SpecialPageFactory.php(635): SpecialPage->run()

#3 /var/www/html/includes/MediaWiki.php(307): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

#4 /var/www/html/includes/MediaWiki.php(940): MediaWiki->performRequest()

#5 /var/www/html/includes/MediaWiki.php(543): MediaWiki->main()

#6 /var/www/html/index.php(53): MediaWiki->run()

#7 /var/www/html/index.php(46): wfIndexMain()

#8 {main}

Kghbln (talkcontribs)

I just realize that this is already tracked with task T135265.

Wpinfold (talkcontribs)

I am not trying to replace existing users just add new ones. I would be very happy to let extension set a temporary password and have the user change it when they log in. Is there a way to do that in the CSV file? What am I missing?

Kghbln (talkcontribs)

The extension in it's entirety appears to be broken, since the now removed method is called no matter what you do with it.

Wpinfold (talkcontribs)

Thanks for walking me through this. Is there another way to register a large number of users?

Kghbln (talkcontribs)

Ideally this extension needs to be fixed. There is the createAndPromote.php script which you can use to create accounts. It will require some work to do create a shell script to mass create but with a little help of a spreadsheet ...

Wpinfold (talkcontribs)

That is an excellent suggestion. I also need to set an email address so users could get a new password request. resetUserEmail.php did that so the two together did exactly what I needed. Thank you.

Kghbln (talkcontribs)

You are welcome. Glad that the way out worked. Still, getting this extension fixed will be cool.

Wpinfold (talkcontribs)

It would. My PHP is probably not up to the task but I will loop back and look at it when I have a moment. Seems like making the only option to create a temporary password should not be a huge amount of work but for me it would require some learning.

Kghbln (talkcontribs)

If time permits it will indeed be great. Sadly I have basically no PHP knowledge at all.

Reply to "Fatal exception of type "Error""