Confirmed 2.3.2 Data too long for column 'embed_metadata

shqawe

Member
Affected version
2.3.2
When i try to Rebuild post embed metadata i got this error

Code:
UPDATE  `xf_post` SET `embed_metadata` = ? WHERE `post_id` = 274929
------------

#0 src/XF/Db/Mysqli/Statement.php(207): XF\Db\AbstractStatement->getException('MySQL query err...', 1406, '22001')
#1 src/XF/Db/Mysqli/Statement.php(86): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1406, '22001')
#2 src/XF/Db/AbstractAdapter.php(96): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(328): XF\Db\AbstractAdapter->query('UPDATE  `xf_pos...', Array)
#4 src/XF/Mvc/Entity/Entity.php(1575): XF\Db\AbstractAdapter->update('xf_post', Array, '`post_id` = 274...')
#5 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->_saveToSource()
#6 src/XF/Job/AbstractEmbedMetadataJob.php(135): XF\Mvc\Entity\Entity->save()
#7 src/XF/Job/AbstractEmbedMetadataJob.php(102): XF\Job\AbstractEmbedMetadataJob->saveMetadata(Object(XF\Entity\Post), Array)
#8 src/XF/Job/Manager.php(275): XF\Job\AbstractEmbedMetadataJob->run(8)
#9 src/XF/Job/Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#10 src/XF/Job/Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#11 src/XF/Admin/Controller/ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#12 src/XF/Mvc/Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(269): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#14 src/XF/Mvc/Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#15 src/XF/Mvc/Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#16 src/XF/App.php(2813): XF\Mvc\Dispatcher->run()
#17 src/XF.php(802): XF\App->run()
#18 admin.php(15): XF::runApp('XF\\Admin\\App')
#19 {main}
 
Does the BBCode for post 274929 have a lot of images or any particularly long image URLs? 64kb+ of combined embedded metadata raises some alarms. By default posts can only contain 10kb of text total.
 
Yes post 274929 have a lot of bbcodes from vb like this code for example
Rich (BB code):
 [FONT=&quot][30][/FONT]

Once i remove these code the rebuild process continue and stop again with same error with many posts which have same bbcodes.

So what i did to continue the rebuild process is i have to change every post manually to solve this problem.
 
Are you able to share the exact content of one of these posts that caused it to halt. I don’t think these should be logged as embed metadata so that’s slightly confusing.
 
Your are right after i modified many posts i found the problem is from some images it post it as binary and i think this is the actual problem.
Yes that makes a lot more sense.

Were these particularly old posts (maybe from a previous forum software) or do you have a really high "max message length" set? We recommend keeping the message length set to its default of 10,000 which would essentially mitigate the issue.

That being said, we might still want to consider changes here to avoid this. Perhaps we can skip over data URI images, or handle long embed_metadata more gracefully, or look to increasing the max length of the embed_metadata field going forwards.
 
do you have a really high "max message length" set
No it's the default 10,000.

Perhaps we can skip over data URI images, or handle long embed_metadata more gracefully, or look to increasing the max length of the embed_metadata field going forwards.

I thinks the best one is to skip this with warning message for the posts which have this max data with post id and thread id. I am talking here spacial when we run rebuild cache.
 
Back
Top Bottom