Jump to content

Uploading images is failing

  • Babble 2.1.3 Gremlins Bug

Hi @Michael

I'm unable to upload images - not sure why.  This is the response I get when trying to upload:


When I look in my error logs, the latest one is:

ErrorException: Object of class stdClass could not be converted to string (4096)
#0 /var/www/html/system/Lang/Lang.php(1530): IPS\IPS::errorHandler(4096, 'Object of class...', '/var/www/html/s...', 1530, Array)
#1 /var/www/html/system/Lang/Lang.php(1548): IPS\_Lang::replace(Array, Array, Object(stdClass))
#2 /var/www/html/system/Lang/Lang.php(1548): IPS\_Lang::replace(Array, Array, Array)
#3 /var/www/html/system/Lang/Lang.php(1743): IPS\_Lang::replace(Array, Array, Array)
#4 /var/www/html/system/Lang/Lang.php(1445): IPS\_Lang->replaceWords(Array)
#5 /var/www/html/system/Output/Output.php(774): IPS\_Lang->parseOutputForDisplay(Array)
#6 /var/www/html/applications/babble/modules/front/view/view.php(545): IPS\_Output->json(Array)
#7 [internal function]: IPS\babble\modules\front\view\_view->updateOnlineData()
#8 /var/www/html/system/Dispatcher/Controller.php(85): call_user_func(Array)
#9 /var/www/html/applications/babble/modules/front/view/view.php(249): IPS\Dispatcher\_Controller->execute()
#10 /var/www/html/system/Dispatcher/Dispatcher.php(129): IPS\babble\modules\front\view\_view->execute()
#11 /var/www/html/index.php(13): IPS\_Dispatcher->run()
#12 {main}

Any help would be appreciated. ;) 

P.S. I can upload files in my downloads section and attach images elsewhere like forum messages and such.  Not sure what's happening here.

User Feedback

Recommended Comments

is that error consistent? I have had it happen here at times, one minute it will say problem uploading and the next it will be fine. I don't have any errors like this in my system log tho, and i've written this sort of thing off to "server hiccups", as it seems "self correcting". You can check the permissions on uploads/babble, to make sure it is writable.

Link to comment
Share on other sites

babble will create folder in uploads called "babble". the file extension does this and it should set it to whatever permissions you have in your constants.php for IPS_FOLDER_PERMS (i think that is what it is called, not at my computer to check it). check the folder uploads/babble to make sure it has the right perms that meet your servers security requirements.  I'll check out the error, to see if i can pin it down, not sure what is using a stdClass tho (as that is sorta a generic object thing in PHP).

Link to comment
Share on other sites

figured out where the stdclass was coming from lol. when i first added rooms when i was working on the original 2.0.0, i stored them in a datastore ( i still do) but i was just converting the array over to a stdClass, but i eventually moved them over to a object of their own, but i missed a spot, the updating for guest was causing it. 

still not sure what is causing the upload issue as i can't reproduce it locally, and when it happens here, there is no error (and its pretty a pretty standard implementation of the uploader form...)

Link to comment
Share on other sites

could you send me a link to your site and give me login credentials so i can see if i can debug there, as i can't reproduce reasonably enough to do so here. (you can PM me the details, as the tracker is public facing).

Link to comment
Share on other sites

I'm calling this a gremlin for now, as there isn't a clear cause, and i can't find a way to reproduce it. I think it might be like you said, some sort of file corruption or a bad datastore/cache. 

Link to comment
Share on other sites

  • Create New...