Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Image_Uploader Issue Upgrading 2.3.1 -> 2.3.2


Reply


2 Posts   1650 Views

Avatar
Johnny

Community Member, 34 Posts

4 July 2009 at 5:06am

Hello!

I have an issue upgrading 2.3.1 to 2.3.2. It only happens in the production site. I've uploaded the cms/, sapphire/ and jsparty/ folder on the remote machine and when I try to get to the image in the CMS, it doesn't work. The error is :

[Notice] Undefined index: Image_Uploader
GET /ss/images/iframe/Event/32/PostCard

Line 157 in /home/bbcm/public_html/ss/sapphire/core/ClassInfo.php
Source

148    /**
149     * @todo Improve documentation
150     */
151    static function ancestry($class, $onlyWithTables = false) {
152       global $_ALL_CLASSES;
153
154       if(is_object($class)) $class = $class->class;
155       else if(!is_string($class)) user_error("Bad class value " . var_export($class, true) . " passed to ClassInfo::ancestry()", E_USER_WARNING);
156
157       $items = $_ALL_CLASSES['parents'][$class];
158       $items[$class] = $class;
159       if($onlyWithTables) foreach($items as $item) {
160          if(!DataObject::has_own_table($item)) unset($items[$item]);
161       }
162       return $items;
163    }

Trace

* ClassInfo::ancestry(Image_Uploader)
Line 451 of Object.php
* Object->__construct()
Line 74 of RequestHandler.php
* RequestHandler->__construct()
Line 274 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/images/iframe/Event/32/PostCard)
Line 118 of main.php

Anyone has an idea what's going on? FYI: It works on my local environment. Not in the remote production environment. Maybe some files haven't been copied by FTP.

I also see there's a cache for ClassInfo. Where's this cache is located? Maybe I should prune it?

Thanks,

JP

Avatar
Johnny

Community Member, 34 Posts

5 July 2009 at 7:03am

Fixed :

Anyone who has an undefined index error in ancestry method should clear the cache :

<?

system ('ls /tmp -l');
system ('rm -vdfr /tmp/silverstripe-cache*');

?>