BUG CMSFileAddController: get page id for action fileexists #961

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@JayDevlin
Contributor

JayDevlin commented Mar 1, 2014

UploadField->fileexists() fails to check if a file exists in a certain folder (and fallsback to "assets/"), if CMSFileAddController doesn't provide a valid folder (-- and fallsback to "assets/newFolder/").

admin/assets/add/?ID=123:
$this->currentPageID() = 123
$folder->getFilename() = 'assets/Uploads/foo/bar/'

admin/assets/add/EditForm/field/AssetUploadField/fileexists?filename=test.jpg:
$this->currentPageID() = 0
$folder->getFilename() = 'assets/NewFolder/'

silverstripe/silverstripe-framework#2904

@JayDevlin

This comment has been minimized.

Show comment
Hide comment
@JayDevlin

JayDevlin Mar 4, 2014

Contributor

For "PHP Fatal error: Call to a member function getFilename() on a non-object"
see silverstripe/silverstripe-framework#2903

Contributor

JayDevlin commented Mar 4, 2014

For "PHP Fatal error: Call to a member function getFilename() on a non-object"
see silverstripe/silverstripe-framework#2903

@simonwelsh

This comment has been minimized.

Show comment
Hide comment
@simonwelsh

simonwelsh Mar 16, 2014

Contributor

Fixed with dc86539

Contributor

simonwelsh commented Mar 16, 2014

Fixed with dc86539

@simonwelsh simonwelsh closed this Mar 16, 2014

@JayDevlin JayDevlin deleted the JayDevlin:2904-page-id-for-fileexists branch Mar 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment