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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Undefined index: start


Go to End
Reply


13 Posts   4023 Views

Avatar
janulka

Community Member, 80 Posts

16 November 2010 at 12:46am

Help?

SS 2.4.3., Data Object Manager 511, Image Gallery 493 and uploadify..

[Notice] Undefined index: start
GET /admin/EditForm/field/GalleryItems/item/33?SecurityID=1417712939/edit?ctf[GalleryItems][start]=0&ctf[GalleryItems][per_page]=10&ctf[GalleryItems][showall]=0&ctf[GalleryItems][sort]=SortOrder&ctf[GalleryItems][sort_dir]=&ctf[GalleryItems][search]=&ctf[GalleryItems][filter]=AlbumID_1&ctf[GalleryItems][view]=grid&ctf[GalleryItems][imagesize]=100

Line 139 in /home/roldagru/public_html/dataobject_manager/code/DataObjectManager.php
Source

130        $this->sort_dir = trim($dir);
131        }
132        else {
133        $this->sort = $this->sourceSort;
134        $this->sort_dir = "ASC";
135        }
136       }
137
138       if(isset($_REQUEST['ctf'][$this->Name()])) {
139          $this->start = $_REQUEST['ctf'][$this->Name()]['start'];
140          $this->per_page = $_REQUEST['ctf'][$this->Name()]['per_page'];
141          $this->showAll = $_REQUEST['ctf'][$this->Name()]['showall'];
142          $this->search = $_REQUEST['ctf'][$this->Name()]['search'];
143          $this->filter = $_REQUEST['ctf'][$this->Name()]['filter'];         
144          $this->sort = $_REQUEST['ctf'][$this->Name()]['sort'];
145          $this->sort_dir = $_REQUEST['ctf'][$this->Name()]['sort_dir'];

Trace

* DataObjectManager->__construct(ImageGalleryPage,GalleryItems,ImageGalleryItem,Array,getCMSFields_forPopup,,,)
Line 48 of FileDataObjectManager.php
* FileDataObjectManager->__construct(ImageGalleryPage,GalleryItems,ImageGalleryItem,Image,Array,getCMSFields_forPopup,,,)
Line 23 of ImageDataObjectManager.php
* ImageDataObjectManager->__construct(ImageGalleryPage,GalleryItems,ImageGalleryItem,Image,Array,getCMSFields_forPopup,,,)
Line 13 of ImageGalleryManager.php
* ImageGalleryManager->__construct(ImageGalleryPage,GalleryItems,ImageGalleryItem,Image,Array,getCMSFields_forPopup)
Line 171 of ImageGalleryPage.php
* ImageGalleryPage->getCMSFields(CMSMain)
Line 443 of CMSMain.php
* CMSMain->getEditForm(48)
Line 1038 of LeftAndMain.php
* LeftAndMain->EditForm(SS_HTTPRequest)
Line 193 of Controller.php
* Controller->handleAction(SS_HTTPRequest)
Line 137 of RequestHandler.php
* RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
* Controller->handleRequest(SS_HTTPRequest)
Line 281 of Director.php
* Director::handleRequest(SS_HTTPRequest,Session)
Line 124 of Director.php
* Director::direct(/admin/EditForm/field/GalleryItems/item/33)
Line 127 of main.php

This appears when I try to edit image in Image gallery. I tried also to comment out the line 139 "$this->start = $_REQUEST['ctf'][$this->Name()]['start'];", and edit the image, but then the fields are not editable any more (I am trying to edit image description / caption)

Thanks a lot in advance..

Avatar
Wilson

Community Member, 63 Posts

16 November 2010 at 9:58am

I'm getting this too.

Doing a bit of trial and error with my config to see if I can squelch it.

Avatar
Wilson

Community Member, 63 Posts

16 November 2010 at 4:45pm

Never found it, but reverting to 2.4.2 fixed it.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

17 November 2010 at 3:56am

This was fixed in r513.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
Wilson

Community Member, 63 Posts

17 November 2010 at 4:19am

Thanks UC!

Avatar
xeraa

Google Summer of Code Hacker, 58 Posts

17 November 2010 at 2:16pm

I'm still getting the same error - using SS 2.4.3, the latest version of Uploadify and DataObjectManager but without the Gallery module. I've more or less rolled my own.

On the CMS page itself the array is fully available:

array(9) { ["start"]=> string(2) "10" ["per_page"]=> string(2) "10" ["showall"]=> string(1) "0" ["sort"]=> string(9) "SortOrder" ["sort_dir"]=> string(0) "" ["search"]=> string(0) "" ["filter"]=> string(0) "" ["view"]=> string(4) "grid" ["imagesize"]=> string(3) "100" }

But in the pop-up window "start" is missing:

array(8) { ["per_page"]=> string(2) "10" ["showall"]=> string(1) "0" ["sort"]=> string(9) "SortOrder" ["sort_dir"]=> string(0) "" ["search"]=> string(0) "" ["filter"]=> string(0) "" ["view"]=> string(4) "grid" ["imagesize"]=> string(3) "100" }

How does r513 (Uploadify update) actually relate to the problem in DOM?
My current quick'n'dirty hack is

$this->start = (isset($_REQUEST['ctf'][$this->Name()]['start'])) ? $_REQUEST['ctf'][$this->Name()]['start'] : 0;

, but that's obviously no real solution...

Avatar
frankmullenger

Forum Moderator, 53 Posts

17 November 2010 at 2:43pm

I get the same error using r 513 of both DataObjectManager and Uploadify and SilverStripe 2.4.3, the patch by xeraa fixes the issue. But also get the issue where editing the object results in viewing it, the patch here seems to work though for anyone else with similar issues: http://silverstripe.org/dataobjectmanager-module-forum/show/7010?start=264#post295027

Avatar
UncleCheese

Forum Moderator, 4094 Posts

18 November 2010 at 4:38am

Can you guys replicate this on the demo site? http://dataobjectmanager.carlinowebdesign.com/admin

admin
password

The demo is always on the latest version of all the modules, so if you can reproduce it there I have something to work with..

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Go to Top