Jump to content
X2Community Forums

Unable to view / delete file


Recommended Posts

I uploaded a png file but the file was corrupt and now I get a 500 error whenever I try to view it. I am unable to remove this file - has anyone seen this before? Can someone please tell me how I can remove the file? I tried deleting it on the server side but the file still appears in the media section.

 

Error Code: 500
Error Message: htmlspecialchars() expects parameter 1 to be string, array given
Stack Trace:

PHP warning in /data/upload/framework/web/helpers/CHtml.php(108)
#0 /data/upload/framework/web/helpers/CHtml.php(108): htmlspecialchars()
#1 /data/upload/protected/components/formatters/FieldFormatterBase.php(52): encode()
#2 /data/upload/protected/modules/media/components/MediaFieldFormatter.php(55): MediaFieldFormatter->render()
#3 /data/upload/protected/components/formatters/FieldFormatter.php(84): MediaFieldFormatter->renderDimensions()
#4 /data/upload/protected/models/X2ActiveRecord.php(128): MediaFieldFormatter->renderAttribute()
#5 /data/upload/protected/modules/media/models/Media.php(389): Media->renderAttribute()
#6 /data/upload/protected/components/DetailView.php(145): Media->renderAttribute()
#7 /data/upload/protected/components/RecordView.php(515): DetailView->renderAttribute()
#8 /data/upload/protected/components/RecordView.php(453): DetailView->renderLeftLabel()
#9 /data/upload/protected/components/RecordView.php(406): DetailView->renderItem()
#10 /data/upload/protected/components/RecordView.php(385): DetailView->renderColumn()
#11 /data/upload/protected/components/RecordView.php(328): DetailView->renderRow()
#12 /data/upload/protected/components/RecordView.php(301): DetailView->renderSection()
#13 /data/upload/protected/components/RecordView.php(283): DetailView->renderSections()
#14 /data/upload/protected/components/RecordView.php(178): DetailView->renderMain()
#15 /data/upload/protected/controllers/x2base.php(828): DetailView->run()
#16 /data/upload/protected/modules/media/views/media/view.php(88): MediaController->widget()
#17 /data/upload/framework/web/CBaseController.php(126): require()
#18 /data/upload/framework/web/CBaseController.php(95): MediaController->renderInternal()
#19 /data/upload/framework/web/CController.php(869): MediaController->renderFile()
#20 /data/upload/protected/controllers/x2base.php(726): MediaController->renderPartial()
#21 /data/upload/protected/modules/media/controllers/MediaController.php(89): MediaController->render()
#22 unknown(0): MediaController->actionView()
#23 /data/upload/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()
#24 /data/upload/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()
#25 /data/upload/framework/web/CController.php(308): CInlineAction->runWithParams()
#26 /data/upload/framework/web/filters/CFilterChain.php(133): MediaController->runAction()
#27 /data/upload/protected/controllers/x2base.php(578): CFilterChain->run()
#28 /data/upload/framework/web/filters/CInlineFilter.php(58): MediaController->filterSetPortlets()
#29 /data/upload/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter()
#30 /data/upload/framework/web/filters/CFilter.php(40): CFilterChain->run()
#31 /data/upload/framework/web/filters/CFilterChain.php(130): FileUploadsFilter->filter()
#32 /data/upload/framework/web/filters/CFilter.php(40): CFilterChain->run()
#33 /data/upload/framework/web/filters/CFilterChain.php(130): X2AjaxHandlerFilter->filter()
#34 /data/upload/framework/web/CController.php(291): CFilterChain->run()
#35 /data/upload/framework/web/CController.php(265): MediaController->runActionWithFilters()
#36 /data/upload/framework/web/CWebApplication.php(282): MediaController->run()
#37 /data/upload/framework/web/CWebApplication.php(141): X2WebApplication->runController()
#38 /data/upload/framework/base/CApplication.php(185): X2WebApplication->processRequest()
#39 /data/upload/index.php(64): X2WebApplication->run()
X2Engine Version:  6.9
PHP Version:  7.0.30
Link to post
Share on other sites

OK I feel dumb but the solution was really easy - I had to log in as the Administrator user and then I was able to see the little trash bin icon in the media section to delete it. I hope this helps in case someone else runs into this issue!

Link to post
Share on other sites
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...