K a M a L described the issue as $customTitle is never an empty string but instead it gets assigned null which causes the if statement to be faulty as it attempts to filter out empty string as the disallowed value when it should be filtering out null as well which is also equivelant to an empty string in terms of lack of meaningful data.The custom title is not the issue - the actual issue is deeper in the code. Others mentioned commenting out the IF but doing that caused errors. I added the code I did so the script would not fail.
A better solution that seems to work is making a backup of your original, then replace it with an earlier version - I tried 2.2.11 and it worked fine without any code changes except for changing the STATE of the users - I wanted to change the STATE to "bounced email" and that only did the change on about 80 of the 1500 I needed it to.
This did not work for me for batch updating a security lock.For what it's worth, the bulk update worked for me when I deleted Rejected users, ie spammers (no errors) so this is the first I hear of this issue. I know to wait for a fix now though.
Same for me. Tried on several of my forums using v2.2.12 and no luck. The one time I needed to batch update to stop the spammers from accessing old accounts, can't do it.This did not work for me for batch updating a security lock.
src/XF/Job/UserAction.php
.$customTitle = $this->getActionValue('custom_title');
if ($customTitle !== '')
{
$user->custom_title = $customTitle;
}
if ($customTitle = $this->getActionValue('custom_title'))
{
$user->custom_title = $customTitle;
}
I did what @Chris D suggested and it worked for me- https://xenforo.com/community/threads/batch-update-users-broken-in-2-2-12.211063/post-1610382Waiting for an update to fix this problem
That topic is a solution to another problem. My problem is in bulk updatesI did what @Chris D suggested and it worked for me- https://xenforo.com/community/threads/batch-update-users-broken-in-2-2-12.211063/post-1610382
You were right. FixedI did what @Chris D suggested and it worked for me- https://xenforo.com/community/threads/batch-update-users-broken-in-2-2-12.211063/post-1610382
This would be lovely if I knew what I was doing, and I don't.For now the recommended workaround is as follows.
Editsrc/XF/Job/UserAction.php
.
Find:
PHP:$customTitle = $this->getActionValue('custom_title'); if ($customTitle !== '') { $user->custom_title = $customTitle; }
Replace with:
PHP:if ($customTitle = $this->getActionValue('custom_title')) { $user->custom_title = $customTitle; }
This will flag files with unexpected contents which you can ignore for this file until the next release.
There may be a delay before changes are rolled out to the XenForo Community.Properly set custom titles when batch updating users
For now the recommended workaround is as follows.
Editsrc/XF/Job/UserAction.php
.
Find:
PHP:$customTitle = $this->getActionValue('custom_title'); if ($customTitle !== '') { $user->custom_title = $customTitle; }
Replace with:
PHP:if ($customTitle = $this->getActionValue('custom_title')) { $user->custom_title = $customTitle; }
This will flag files with unexpected contents which you can ignore for this file until the next release.
After making the above changes, everything seemed to work fine. However, I received a message. Can you guide me on how to deal with this situation?
This will flag files with unexpected contents which you can ignore for this file until the next release.
We use essential cookies to make this site work, and optional cookies to enhance your experience.