what's the best practice here to resolve the conflict? update silverstripe-elemental to 4.1.0?
@gs either upgrade
silverstripe-elemental or find an older version of the package you're requiring which supports an older
Also, if I knew what module you're installing, I feel like there could be an opportunity for a terrible "sounds like you're stuck between a block and a ..." pun
Would someone be able to explain how SilverStripe distinguishes between a field and a method when specifying things like summary fields? It works fine, I'm just curious about the under-the-hood implementation. I've had a look through the code, but seems like I'm missing some parts there.
I haven’t been following what you are trying to achieve but that error is telling you that it can’t find the class that you are trying to extend from. You’ll need to add:
- use SilverStripe\CMS\Model\VirtualPage;
@jakx I'm trying to install silverstripe-mimevalidator,
It's throwing a conflict on both dnadesign/silverstripe-elemental and silverstripe/userforms
@Nik Have a look at
Looks good, although I don't get how
summary_fields resolves a method without a
getMethod? An entry named
SomeMethod will work, even without having a
getSomeMethod function, but just a
SomeMethod function. How? Follow up would be how dot notation is being parsed, although for that I found
GridFieldDataColumns.getValueFromRelation - not sure if it's the correct one
$summary_fields will resolve methods without a "get" prefix, only if they're declared either as first-class, class-properties or through having been declared as a "Field" (which silverstripe defines as being a field in
$db or in
You can test this by declaring a randomly method
Wibble() that returns the string "Pencils up nose" (Blackadder episode...) and calling it from
If that works, and your
GridField displays a column each of who's cells shows "Pencils up nose", then I couldn't tell you what sorcery was doing that...
I got no puns for that sadly @gs 😅, best I got it "sounds like you're stuck between a block and an
application/hard place". Sorry to let you down.
Also, adding new modules can take a bit of juggling, but you'll find a sweet spot after a bit of review. Good luck!