Resource icon

Post Content Find / Replace 2.0.1

No permission to download
mysql> SELECT version_id
    -> FROM xf_addon
    -> WHERE addon_id = 'XF';
| version_id |
|    2000270 |
1 row in set (0.00 sec)

mysql> SELECT version_id
    -> FROM xf_upgrade_log
    -> ORDER BY completion_date DESC;
| version_id |
|    2000270 |
|    2000170 |
|    2000037 |
|    2000036 |
|    2000034 |
|    2000033 |
|    2000032 |
|    2000010 |
|    1051670 |
|    1051570 |
|    1051370 |
|    1051070 |
|    1050970 |
|    1050870 |
|    1050670 |
|    1050470 |
|    1050270 |
|    1050170 |
|    1050070 |
|    1050032 |
|    1050010 |
|    1041070 |
|    1040770 |
|    1040670 |
|    1040570 |
|    1040470 |
|    1040370 |
|    1040270 |
28 rows in set (0.00 sec)
Seems like we're not rebuilding the add-on cache at some point then. I'll track that down :)

For now, run this query:
UPDATE xf_data_registry
SET data_value = 'a:1:{s:2:"XF";i:2000270;}'
WHERE data_key = 'addOns'
You should then be able to install the add-on... phew!
Fixed that XF bug now. Ironically, installing an add-on rebuilds the add-on cache. So if you had installed any other add-on first... Good job we've got it sorted though, thanks.
Just installed the XF2 forum, inserted this add-on, but it does not want to open - why? Writes:

The following errors must be resolved before continuing:
  • Post Content Find / Replace requires XenForo 2.0.0 Beta 7+.
It’s a bug that we have fixed in the next XF version.

It relates to a cache which is out of date. Have you attempted to install any other add ons yet? That would most likely solve it and then this add on will install properly.
Yes, I tried it in other forums, it also got up only if some kind of addon is already installed. I'm waiting for the new version! Thank you for your continued support!
I am on the way to migrate my old good 1.4 XF setup to 2.0
Despite, i am using XenGallery Addon to display Photos and Video in posts.
As the addon is not yet compatible with 2.0, i am looking for a wat to migrate the content to XF Media.
Do you think this project would be Ok by using Post/Replace Addon ?
I have thousands of soft deleted threads I'm gonna try to recover.
Does this work on soft deleted threads?

And also can someone please help me to remove the url portion of this:

From this:
[INDENT][B][URL='']My Site[/URL][/B][/INDENT]

and make it into:

I checked the other thread but couldn't find something similar as a regex expression.


I found I can match the url part with this
, and repleace it with empty string.
Just this would repleace all urls, but I only want to repleace it where "My Site" occurs. Gonna dig more.


I just did this sql query and it worked:

UPDATE xf_post SET message = replace(message,"[URL='']My Site[/URL]","My Site");
Last edited:
@Chris D Hopefully you can spot what the issue is with this error generated from the addon. We're just doing a very simple replacement of oldurl with newurl. IE the search is / and the replacement is Error is:

InvalidArgumentException: Received invalid UTF-8 for string column [message] in src/XF/Mvc/Entity/Entity.php at line 688
XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 575
XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 505
XF\Mvc\Entity\Entity->__set() in src/XF/Service/Post/Preparer.php at line 98
XF\Service\Post\Preparer->setMessage() in src/XF/Service/Post/Editor.php at line 112
XF\Service\Post\Editor->setMessage() in src/addons/XFPR/Admin/Controller/PostReplace.php at line 57
XFPR\Admin\Controller\PostReplace->actionReplace() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1891
XF\App->run() in src/XF.php at line 328
XF::runApp() in admin.php at line 13
As specified in the rating comment, for things like #\[quote(.*)# where there's a ton of results, it just dies with Error 500 because:
  • ErrorException: Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 5379376 bytes)
  • internal_data/code_cache/templates/l1/s0/admin/xfpr_postreplace_index.php:81
Any way to limit the amount fetched/replaced? (e.g.: "Fetch first 10.000 records" -- should be an edit box for user to specify).
Hi, in our website few of the BBCs are there,
eg. [FONT=&quot] some contents or paragraphs [/FONT]

Hot to replace this.

Thank you.
@Chris D .. I can't get it to work because of a 500 Internal Server Error. How to limit the number of threads each time we run this addon?
After we converted to xenforo
Some fonts have resized and become small in some posts
They can be manually modified and resized to the largest but they are too many
Is there any help to change them all to the larger?

Eg font
How larger the size to the largest ?
Request Timeout
This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

What do I need to update on my server to fix this. I have a lot of posts almost 7million.
Ask your host to increase the connect_timeout value in the MySQL config file.

It may also be worth trying to filter the matches down to a lower number, if possible.
Still having issues even on my new server with Connect_Timeout set to 30 minutes. It will either go to a 500 error or just nothing happens at all. The server errors are still saying
  • ErrorException: Fatal Error: Maximum execution time of 60 seconds exceeded
  • src/XF/Mvc/Entity/Manager.php:697
Top Bottom