Jump to:

7936 Posts in 1537 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Undefined index: start

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 3856 Views
  • janulka
    Avatar
    Community Member
    80 Posts

    Undefined index: start Link to this post

    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..

  • Wilson
    Avatar
    Community Member
    63 Posts

    Re: Undefined index: start Link to this post

    I'm getting this too.

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

  • Wilson
    Avatar
    Community Member
    63 Posts

    Re: Undefined index: start Link to this post

    Never found it, but reverting to 2.4.2 fixed it.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Undefined index: start Link to this post

    This was fixed in r513.

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

  • Wilson
    Avatar
    Community Member
    63 Posts

    Re: Undefined index: start Link to this post

    Thanks UC!

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Undefined index: start Link to this post

    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...

  • frankmullenger
    Avatar
    Forum Moderator
    51 Posts

    Re: Undefined index: start Link to this post

    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

  • UncleCheese
    Avatar
    4085 Posts

    Re: Undefined index: start Link to this post

    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

    3856 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.