alt

is there a way a FieldGroup's title can be set independently of its HTML id? I want multiple field groups titled "Foo" but this appears to break things

alt

ahah, checking out the code for http://FieldGroup_holder.ss reveals I can do FieldGroup::create()->setTitle('foo')->setName('bar') and the name will be used as ID

alt

gee it's a lot of boilerplate though isn't it?

alt

aha, rubber duck debugging strikes again! Looks like it works if I remove

  1. Published
  2. LiveVersion          
  3. LatestDraftVersion

from my gql

alt

hey all, I'm trying to get some version history working for my dataobject via model admin and was pointed at https://docs.silverstripe.org/en/4/developer_guides/model/versioning/#using-the-history-viewer . I'm most of the way there, but am running in to an error where it is complaining the _Live table doesn't exist (I guess because I'm not publishing from draft, just maintaining a history)

Show 1 attachment(s)
docs.silverstripe.org  
Versioning

Developer and user documentation for the Silverstripe CMS and framework.

Hide attachment content
alt

how do I get versioning working in ModelAdmin? I've added private static $versioned_gridfield_extensions = true; as per https://docs.silverstripe.org/en/4/developer_guides/model/versioning/#controlling-how-cms-users-interact-with-versioned-dataobjects but no dice

Show 1 attachment(s)
docs.silverstripe.org  
Versioning

Developer and user documentation for the Silverstripe CMS and framework.

Hide attachment content
Kong Jin Jie

I got it working recently, but facing other issues such as sort by Version number DESC, I am very new to GraphQL not sure how I can sort it

Kong Jin Jie

I agree! It took me some time to actually make it work.

alt

how did you get around " error Unable to resolve path to module 'lib/Injector' import/no-unresolved"

Kong Jin Jie

Need to update to the latest silverstripe/webpack-config

Kong Jin Jie

I guess package.json on the documentation is outdated. This is my version:

  1. {
  2. "name": "app",
  3. "scripts": {
  4. "build": "yarn && NODE_ENV=production webpack -p --bail --progress",
  5. "watch": "yarn && NODE_ENV=development webpack --watch --progress"
  6. },
  7. "dependencies": {
  8. "react-apollo": "^0.7.1",
  9. "graphql-tag": "^0.1.17"
  10. },
  11. "devDependencies": {
  12. "@silverstripe/webpack-config": "^1.4.0",
  13. "webpack": "^2.6.1"
  14. },
  15. "jest": {
  16. "roots": [
  17. "client/src"
  18. ],
  19. "moduleDirectories": [
  20. "app/client/src",
  21. "node_modules",
  22. "node_modules/@silverstripe/webpack-config/node_modules",
  23. "vendor/silverstripe/admin/client/src"
  24. ]
  25. },
  26. "babel": {
  27. "presets": [
  28. "env",
  29. "react"
  30. ],
  31. "plugins": [
  32. "transform-object-rest-spread"
  33. ]
  34. },
  35. "engines": {
  36. "node": "^10.x"
  37. }
  38. }
Kong Jin Jie

I basically, changed node to ^10 and change `@silverstripe/webpac-config`` to ^1.4.0

alt

ta, updating webpack-config did the trick


Show less replies
alt

I was hoping to avoid having to remember to specify a field title rather than inferring from the name for example

alt

the aim is to display to the end user correctly with the least amount of work

alt

https://stackoverflow.com/questions/3417180/exotic-names-for-methods-constants-variables-and-fields-bug-or-feature

Show 1 attachment(s)
Stack Overflow  
Exotic names for methods, constants, variables and fields - Bug or Feature?

after some confusion in the comments to Is it safe to have 1 letter class names in PHP, e.g A, B, C I thought I make into a question. According to the PHP manual, a valid class name should match

Hide attachment content