ok. left my comment there.
using translation sometimes makes me think about the advantages of esperanto... ;)
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
ok. left my comment there.
using translation sometimes makes me think about the advantages of esperanto... ;)
Two minor template-bugs:
1) Setting $myDOM->setPermissions('add') won't remove either the delete or the edit buttons. This can easily be solved by adding <% if Can(delete) %> ... <% end_if %> around line 76 and <% if Can(edit) %> ... <% end_if %> aroundline 75 of DataObjectManager.ss. I guess it's the same for the other templates (but haven't tested it)
2) Not really a bug, more of an improvement: Removing the add-button with setPermissions will leave a huge blank space above the DOM. This can either be solved by putting the title of the DOM instead of the button with <% else %> or by removing the whole block by adding <% if HasFilter || Can(add) %> ... <% end_if %> around lines 3-14 of DOM.ss (and again I guess it's the same for the other DOM-templates)
BTW, did you deliberately choose not to support the $myDOM->setPermissions('show') option?
setPermissions() takes an array, not a string.
$myDom->setPermissions(array('add','edit','upload'));
Sorry,
That's a typo in the post...
The issue still exists
(literal quote from my code, which doesn't hide the delete-button (though disables it's functionality): $accountobject->setPermissions(array('edit')); // turn add- and delete-buttons off)
Hi!
When trying to import existing images to an image gallery I get the following error:
Error: Uncaught Exception: Object->__call(): the method 'backlinktracking' does not exist on 'ImageGalleryImage'
At line 551 in /srv/rsv-kanu_neu/sapphire/core/Object.php
I am using the latest releases of Silverstripe and Image Gallery.
Best Regards,
Christian
I'm not sure why that happens. Looks like an SS bug to me. For now I've put in a temporary fix that you should get if you update your svn.
Unfortunatly, the problem remains.
The error message also is still the same.
I found an entry in apache error-log, though:
File does not exist: /srv/rsv-kanu_neu/bulk_uploader
I reinstalled Silverstripe and also image gallery.
A side effect: When the error occurs, the first selected image gets destroyed.
Thank's a lot for your effort!
Christian
Okay I'm running Safari 4.03 OS X 10.5.8 and SS 2.2.3 on MAMP
And the Delete Record Icon isn't showing up.
Here is the Code for my DataObject
class UserApplication extends DataObject {
static $db = array(
'FirstName' => 'Text',
'LastName' => 'Text',
'Email' => 'Text',
'CompanyName' => 'Text',
'CompanyType' => "Text",
'CompanyURL' => 'Text',
'CompanyPhone' => 'Text',
'Address' => 'Text',
'Address2' => 'Text',
'City' => 'Text',
'Country' => 'Text',
'TaxIDNumber' => 'Text',
'Distributor' => 'Text',
'SalesRep' => 'Text',
'Description' => 'Text',
'ApprovedMember' => 'Boolean',
'Password' => 'Text'
);
static $has_one = array(
'RegistrationPage' => 'RegistrationPage',
);
public function getCMSFields_forPopup()
{
$companyTypeList = array(
'Retail' => 'Retail',
'Online' => 'Online',
'Distributor' => 'Distributor',
'Press' => 'Press'
);
return new FieldSet (
new CheckBoxField('ApprovedMember', 'Approved Member'),
new TextField('FirstName', 'First Name'),
new TextField('LastName','Last Name'),
new EmailField('Email'),
new TextField('CompanyName','Company Name'),
new DropdownField('CompanyType','Company Type',$companyTypeList),
new TextField('CompanyURL','Company Website'),
new TextField('CompanyPhone','CompanyPhone'),
new TextField('Address','Address'),
new TextField('Address2','Address Line 2'),
new TextField('City','City'),
new TextField('Country','Country'),
new TextField('TaxIDNumber','TaxIDNumber'),
new TextField('Distributor','Distributor'),
new TextField('SalesRep','Sales Rep'),
new TextareaField('Description','Description'),
new ConfirmedPasswordField('Password')
);
}
}
And from the Pagetype
class RegistrationPage extends Page
{
static $has_many = array (
'UserApplications' => 'UserApplication'
);
public function getCMSFields()
{
$f = parent::getCMSFields();
$applicationManager = new DataObjectManager(
$this,
'UserApplications',
'UserApplication',
array('FirstName' => 'FirstName','LastName' => 'LastName','Email' => 'Email','CompanyName' => 'CompanyName','CompanyType' => "CompanyType",'CompanyURL' => 'CompanyURL','CompanyPhone' => 'CompanyPhone','Address' => 'Address','Address2' => 'Address2','City' => 'City','Country' => 'Country','TaxIDNumber' => 'TaxIDNumber','Distributor' => 'Distributor','SalesRep' => 'SalesRep','Description' => 'Description','ApprovedMember' => 'ApprovedMember','Password' => 'Password'),
'getCMSFields_forPopup'
);
$f->addFieldToTab("Root.Content.Applications", $applicationManager);
$f->removeFieldFromTab('Root.Content.Main', 'Content');
$f->removeFieldFromTab('Root.Content.Main', 'LifestyleText');
return $f;
}
}
class RegistrationPage_Controller extends Page_Controller
{
}
But in the CMS the delete button doesn't show up in any of my DataObjectManagers, though it does in the FileDataObjectManager
Attachments are disabled so I Can't post a screen Cap