-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMSAction - Removes Gridfield details on saving #19
Comments
It might depend on what your action does ? I'm not an expert on gridfield state so maybe it's a matter of checking when the URL is updated incorrectly. I don't see how an Ajax request to an action should change anything |
Me either @lekoala, all the action does it guzzle a logo from a URL and save a local copy. It then writes the dataobject to the database to store the ID of the newly 'minted' image in the Filesystem. I then tried with I shall dig a bit deeper in XDebug |
|
@mspacemedia actually just tried to test this, and i never have gridfield status in the url so prev/next (even the built in nav from silverstripe) always apply to the unfiltered list. |
@lekoala I'm seeing this issue in the latest SS4 build from this in composer:
|
I'm keeping this open but I don't plan to work on it until I have a reproduceable example. If anyone has the issue or finds a solution, a PR is welcome |
From SilverStripe 4.12 gridfield state is present in URL. Saving DataObject removes gridState from URL. Default SilverStripe implementation does not remove this from URL. Also Prev/Next buttons do not respect filter applied on gridfield (is present in URL on selected DataObject). |
@silverstripesk wow not sure how i missed that :) |
@silverstripesk @mspacemedia i've made quite a few grid state related updates on master, if you can give it a try and let me know how it goes ? ;-) |
works on Prev/Next/Save+Close |
@silverstripesk that's very odd, it seems to be working just fine for me (tested in modeladmin, on base grid and nested grids) |
indeed, missed that one ;-) |
This might be my implementation, but when I click an item in a gridfield and then the resultant CMSAction on that object the module removes the Gridfield status from the URL, this then means clicking
next/prev
orsave and next
do not work as normal.->setShouldRefresh
totrue
orfalse
makes no difference either.My code is in updateCMSActions on an extension:
$getLogo = CustomAction::create('doGetLogo', 'Get Logo');
$getLogo->setShouldRefresh(false);
$actions->push($getLogo);
The text was updated successfully, but these errors were encountered: