Jay

ah that did the trick, thanks guys

👍 (1)
Jay

$grid->getConfig()->removeComponentsByType('GridFieldFilterHeader'); I am trying to remove the search icon but this seems to not remove it. Any ideas?

Jay

Can I set an ENV variable to be used inside one of the config.yml files?

Jay

@dorsetdigital Do you know when 4.5 is being officially released?

dorsetdigital

Just looking though, it went into feature freeze on 20th November. There's a release candidate tagged by the look of it.

dorsetdigital

We might see a release this side of Christmas, in theory

Jay

https://github.com/silverstripe/silverstripe-versioned/issues/200 Has this issue ever been fixed?

Show 1 attachment(s)
GitHub  
GridFieldArchiveAction archives the end object in a versioned many_many relation · Issue #200 · silverstripe/silverstripe-versioned

Affected Version silverstripe/recipe-cms 4.3.0 silverstripe/versioned 1.3.0 Description In SilverStripe 4.3.0 (at least) when you have a many_many through relationship that is versioned (on both th...

Hide attachment content
nightjarnz

No. Improvements were made, but ultimately it kinda made it worse :/

nightjarnz

It's possible to end up with a record that is live that cannot be unpublished.

Jay
  1. if (isset($searchParams['DraftOnly'])) {
  2. // get draft only records
  3. $stage = Versioned::get_by_stage(Items::class, Versioned::DRAFT)->column('ID');
  4. $live = Versioned::get_by_stage(Items::class, Versioned::LIVE)->column('ID');
  5.  
  6. $ids = array_diff($stage, $live);
  7. if (empty($ids)) {
  8. $query->filter('ID', 0);
  9. } else {
  10. $query->filter('ID', $ids);
  11. }
  12. }

Guys I am having a final issue with my search problem. These DataObject (Items) has over 200,000 results and I am trying to fetch just the draft versions but this is proving to timeout. Is there a better solution to getting just the Draft items?

Conan
Conan in #cms4 2019-11-29 11:19:24 (edited) (deleted)

You could also first just query the $liveIds and then exclude the IDs.

  1. $stage = Versioned::get_by_stage(Items::class, Versioned::DRAFT)->exlude('ID', $liveIds); // <- check that $liveIds is not empty, SS4 does not filter on empty sets.
Jay
  1. SilverStripe\VersionedAdmin\Controllers\CMSPageHistoryViewerController:
  2. class: SilverStripe\CMS\Controllers\CMSPageHistoryController