martimiz

OK, so this was my own issue: I used $controller::curr()->Link() in an Elemental ContactForm::setFormAction(), which you do 😕 Not good…

martimiz

This refers to the use of static::class - it works fine when called from the PageController, but not from the TaskRunner. Any ideas for a workaround maybe? Or is this a bug?

martimiz

Request handler SilverStripe\Dev\TaskRunner does not have a url_segment defined

martimiz

Hi all, I’ve created a task that indexes all pages for a seachengine, which is working fine, instantiating each page and grabbing the content I want. But when I call ElementalPageExtension::getElementsForSearch() from a Page method, I get the following error:

martimiz

Also, just for someone who wants to know, if you put the form in the ElementController, then you need to reference it in your Element for it to be displayed:

martimiz

So now my ElementController actually gets called! 🙂

👍 (1)
martimiz

Thanks! Just found out by going through code that the only thing to do was to set the FormAction to element/$ID/. No need for all that constructing nested controllers and stuff from the info - that is already handled 🙂

martimiz

The only example of it’s use I can find is in the userforms element - but that is rather complex…