Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Bug Reports

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
Go to End
Author Topic: 47872 Views
  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Bug Reports Link to this post

    I'm having a problem with the Image DOM, It appears to have issues accessing Directory with a dash (-) in the name. The files in that dir are accessible from the rest of the CMS, and if I move them to directory without a dash in the name they're accessible from the DOM.

    Firebug reports a 500 error when I try to access those directories. Its not a critical bug (I can just change the naming structure), but I thought you should know. I'm running on MAMP right now, I haven't rolled the site out to my full testing server yet.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    What do you mean by "accessible from DOM?"

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Bug Reports Link to this post

    I'm setting Internal Server Errors when trying to access certain folders through the "Import from an existing folder" dropdown in a nested ImageDataObjectManager. However if I try to add images from those folders through the standard HTMLEditor field, I have no problems

  • Iain_vdw
    Avatar
    Community Member
    22 Posts

    Re: Bug Reports Link to this post

    We think we've found a bug in SWFUpload/FileDataObjectManager. It's caused when a user without full admin rights tries to upload a file in "Files & Images" through an SWFUploadField.

    Setup:
    SS 2.4.0 / 2.4.1
    Latest DOM and SWFUpload modules
    User with access to CMSMain, AssetAdmin, Reports and Comments. No full admin rights.

    Bug:
    When selecting a file in the SWFUpload field and pressing "Upload", the request freezes on processing. With the use of the SWFUpload debug mode and some var_dump()'ing we've located that the permission check in FileDataObjectManager.php line 587 checks for the wrong permission. The checked for permission is

    if(!Permission::check("CMSAccess_CMSMain"))


    when it should be

    if(!Permission::check("CMS_ACCESS_CMSMain"))

    We've tried and tested this and it works normally now without errors.

    Users with full admin rights automatically pass the Permission::check() function because they've got access to all parts of the CMS and the function automatically adds the "ADMIN" role to check for.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    Yup, that was fixed in the last rev. Thanks.

  • nakashu
    Avatar
    Community Member
    24 Posts

    Re: Bug Reports Link to this post

    Hi .

    Found a bug in sorting order of dataobject displayed in the CMS - DOM view. (List View)

    Set up:

    • Any DataObjectManager with minimal configuration (one text field).
    • At least 2 dataobjects items added.
    • Enabled - SortableDataObject::add_sortable_class('YourSortedClass'); in _config.php.
    • Default ordering configuration is -- Ascending

    Behaviour:

    • Click any of the items in the list, so popup window will appear.
    • Close it right after. (no save needed)
    • After refresh the items are in reverse order -- Descending

    The order will be ok again after reloading the page in cms, but after opening the popup again, will change as before.

    Revisions // Where to fix.
    This bug was introduced in r419 - in DataObjectManager.php..
    In the current revision r432 is on line '246' - in DataObjectManager.php

    To fix it - REMOVE

    &ctf[{$this->Name()}][dir]={$sort_dir}

    on line 246.

    another notes
    - When trying to define the Sorting order in _config.php with SortableDataObject::set_sort_dir("ASC");
    or DESC .. it wont change anything
    - Not sure if the removed part is important in other parts of the code..

    UncleCheese can you review the code, thanks also for the great work.

    -- to see more cleary changes of the order add SortOrder values from the db to the view

    public function getCMSFields()
       {
          $f = parent::getCMSFields();
          $manager = new DataObjectManager(
             $this, // Controller
             'GalleryImages', // Source name
             'GalleryImage', // Source class
             array(
                'SortOrder' => 'Order',
                'Title' => 'Názov'
             ),
             'getCMSFields_forPopup'         
          );

    $f->addFieldToTab('Root.Content.Main', $manager);
          
          return $f;
       }      

  • UncleCheese
    Avatar
    4085 Posts

    Re: Bug Reports Link to this post

    Thanks, nakashu,

    I actually added that in a few revs ago because it fixed this problem on several sites. I'll do some more digging and get back to you.

  • Tyler
    Avatar
    Community Member
    2 Posts

    Re: Bug Reports Link to this post

    I "think" there might be an issue with SilverStripe 2.4.1 and the SWFUpload module. I can upload without a hitch using 2.4.0, but in 2.4.1 on numerous sites it just sits at "Uploading...". I tried some of the other recommended fixes where people have previously had this issue but none of them seem to resolve it.

    Here's the SWFUpload debug:

    ---SWFUpload Instance Info---
    Version: 2.2.0 Alpha
    Movie Name: SWFUpload_0
    Settings:
       upload_url: http://mydomain.com/FileDataObjectManager_Controller/handleswfupload
       flash_url: http://mydomain.com/swfupload/javascript/swfupload.swf?swfuploadrnd=837604839
       use_query_string: false
       file_post_name: swfupload_file
       post_params: [object Object]
       file_types:
       file_types_description:
       file_size_limit: 2MB
       file_upload_limit: 20
       file_queue_limit: 20
       debug: true
       prevent_swf_caching: true
       button_placeholder_id: spanButtonPlaceholder
       button_image_url: http://mydomain.com/swfupload/images/upload_button.png
       button_width: 180
       button_height: 24
       button_text: <span class='button'>Upload files</span>
       button_text_style: .button { font-family: Helvetica, Arial, sans-serif; font-size: 12px; }
       button_text_top_padding: 6
       button_text_left_padding: 6
       button_action: -110
       button_disabled: false
       custom_settings: [object Object]
    Event Handlers:
       swfupload_loaded_handler assigned: true
       file_dialog_start_handler assigned: true
       file_queued_handler assigned: true
       file_queue_error_handler assigned: true
       upload_start_handler assigned: true
       upload_progress_handler assigned: true
       upload_error_handler assigned: true
       upload_success_handler assigned: true
       upload_complete_handler assigned: true
       debug_handler assigned: true

    SWF DEBUG: SWFUpload Init Complete
    SWF DEBUG:
    SWF DEBUG: ----- SWF DEBUG OUTPUT ----
    SWF DEBUG: Build Number: SWFUPLOAD 2.2.0 Alpha 2008-10-17
    SWF DEBUG: movieName: SWFUpload_0
    SWF DEBUG: Upload URL: http://mydomain.com/FileDataObjectManager_Controller/handleswfupload
    SWF DEBUG: File Types String: *.*
    SWF DEBUG: Parsed File Types:
    SWF DEBUG: File Types Description: ()
    SWF DEBUG: File Size Limit: 2097152 bytes
    SWF DEBUG: File Upload Limit: 20
    SWF DEBUG: File Queue Limit: 20
    SWF DEBUG: Post Params:
    SWF DEBUG: parentIDName=ParentID
    SWF DEBUG: hasDataObject=0
    SWF DEBUG: OverrideUploadFolder=assets/Uploads/
    SWF DEBUG: controllerID=1
    SWF DEBUG: dataObjectFieldName=
    SWF DEBUG: PHPSESSID=trdp8qqkjg2ek2u883c4jl13g1
    SWF DEBUG: dataObjectClassName=File
    SWF DEBUG: fileFieldName=Files
    SWF DEBUG: fileClassName=File
    SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
    SWF DEBUG:
    SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
    SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
    SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
    SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
    SWF DEBUG: StartUpload: First file in queue
    SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
    SWF DEBUG: Global Post Item: parentIDName=ParentID
    SWF DEBUG: Global Post Item: hasDataObject=0
    SWF DEBUG: Global Post Item: OverrideUploadFolder=assets/Uploads/
    SWF DEBUG: Global Post Item: controllerID=1
    SWF DEBUG: Global Post Item: dataObjectFieldName=
    SWF DEBUG: Global Post Item: PHPSESSID=trdp8qqkjg2ek2u883c4jl13g1
    SWF DEBUG: Global Post Item: dataObjectClassName=File
    SWF DEBUG: Global Post Item: fileFieldName=Files
    SWF DEBUG: Global Post Item: fileClassName=File
    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload. Starting upload to http://mydomain.com/FileDataObjectManager_Controller/handleswfupload for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0

    47872 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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.