CptPillow

I found the problem. With wrapper it seems to require "->end()" on the end of the display logic.

CptPillow

Has anyone experienced the following error when wrapping a gridfield in uncheese display logic wrapper? [Emergency] Uncaught TypeError: Argument 1 passed to SilverStripe\Forms\CompositeField::push() must be an instance of SilverStripe\Forms\FormField, instance of UncleCheese\DisplayLogic\Criteria given

CptPillow

okay will give it a look over

theruss
  • Apply ElementalPageExtension to your DataObject(s) in YML
  • Override elemental's BaseElementCMSEditLinkExtension with your own
  1. SilverStripe\Core\Injector\Injector:
  2. DNADesign\ElementalList\Extension\BaseElementCMSEditLinkExtension:
  3. class: Path\To\My\Extension\BaseElementCMSEditLinkExtension

BaseElementCMSEditLinkExtension:

  1. <?php
  2. ...
  3. public function updateCMSEditLink(&$link)
  4. {
  5. /** @var $owner BaseElement */
  6. $owner = $this->owner;
  7.  
  8. $relationName = $owner->getAreaRelationName();
  9. $parent = $owner->getPage(true);
  10.  
  11. if (!$parent) {
  12. return;
  13. }
  14.  
  15. return Controller::join_links(
  16. singleton(MyDataObject::class)->CMSEditLink($parent->ID),
  17. 'ItemEditForm/field/' . $relationName . '/item/',
  18. $owner->ID,
  19. 'edit'
  20. );
  21. }
  22. ...
CptPillow

as far as I can see it needs to work on atleast 3 different DataObjects

CptPillow

I need it to work on multiple different DataObjects

CptPillow

Hi everyone. Has anyone tried using Elemental on a DataObject as Page? if so how did you change the module to work correctly

CptPillow

Hi everyone. I am trying to add recaptcha to my php forms but dont seem to get it working with the way this form is built. any suggestions where it might need to go or if i am doing something wrong?

jkersu

Have a look at this maybe?https://stackoverflow.com/questions/41536338/add-google-recaptcha-on-a-silverstripe-form

It uses the following module to implement Recpatcha v2: https://github.com/UndefinedOffset/silverstripe-nocaptcha

Show 2 attachment(s)
UndefinedOffset/silverstripe-nocaptcha

A spam protector and form field using the new Google's reCAPTCHA 2 aka No Captcha.

UndefinedOffset/silverstripe-nocaptcha

A spam protector and form field using the new Google's reCAPTCHA 2 aka No Captcha.

Hide attachment content
👍 (1)
CptPillow

@jkersu I get the following error when doing that: [Emergency] Uncaught InvalidArgumentException: Missing spec class

jkersu

Looks like theres a issue where the old url stops working but the new one works: https://github.com/silverstripe/silverstripe-admin/issues/689

Show 1 attachment(s)
DorsetDigital

Tested on Silverstripe 4.1.1 and 4.2.1

When changing the admin route by adding the following YML (as per the docs):

---
Name: myadmin
After:
- '#adminroutes'
---
SilverStripe\Control\Director:
  rules:
    'admin': ''
    'cms': 'SilverStripe\Admin\AdminRootController'

The new URL becomes active and works correctly. The old URL (eg. http://example.com/admin|example.com/admin) now throws a 500 error (below). I would expect it to return a 404.

Uncaught InvalidArgumentException: Missing spec class
GET /admin
Line 403 in /app/vendor/silverstripe/framework/src/Core/Injector/Injector.php

The full stack trace is attached.
https://github.com/silverstripe/silverstripe-admin/files/2482545/admin_error_trace.txt|admin_error_trace.txt

Hide attachment content
jkersu

Try removing this line maybe? 'admin': ''

CptPillow

taking that line out makes /admin work but it shouldnt be that

jkersu

Ok try this the following. I tried it on my machine and it works 🙂

  1. ---
  2. Name: myadmin
  3. After:
  4. - '#adminroutes'
  5. ---
  6. SilverStripe\Control\Director:
  7. rules:
  8. 'admin': ''
  9. 'cms': 'SilverStripe\Admin\AdminRootController'
  10.  
  11. SilverStripe\Admin\AdminRootController:
  12. url_base: 'cms'
  13. ---