Lee

@zemiacsik Thanks, with the help of this http://www.balbuss.com/multiple-has-manys-of-the-same-class/ I think I have it sort of

Show 1 attachment(s)
balbuss.com  
Multiple has_many's of the same class « Balbus SilverStripe Things

In silverStripe you can map one-to-many relations involving the same classes, by using dot-notation. But implementing a couple of ComplexTableField to manage them requires a bit more...

Hide attachment content
Lee

Hi - can someone point me in the right direction for using multiple has_many to the same class?

  1. private static $has_many = array(
  2. 'Menus' => 'Menu',
  3. 'Specials' => 'Menu'
  4. );

And i'd like to display each in separate GridFields, but at the moment I'm getting the same menus in each one.

Lee

... for photos 🤦

Ramon Lapenta

I wouldn’t know how to do the conversion myself, but I usually put a message on the fields indicating the size, weight and format expected and use validation to restrict the extension

guci0

//let the customer upload as he wants

👍 (2)
Ramon Lapenta

I have to disagree with let the customer upload as he wants, without some restrictions you can’t ensure the best experience for the final users

Ramon Lapenta

just need a little bit of training, some validation and it all works fine for everybody.

Lee

Client is uploading in PNG creating large image sizes

Lee

Is it possible to convert a PNG to a JPG via Silverstripes built in tools?

Lee

No, def logged in, it's happening in two environments, seems to be a json encoding error in TreeDropdownfield

Lee

Is anyone else seeing a SyntaxError: Unexpected string in JSON at position ... error when attempting to add a internal page link via TinyMCE?

Lee

What do people recommend for search functionality? The built in tools, a plugin, or using google custom search?

wmk

Depends... How complicated is your Data model? Multi lang? What do you need? Btw, there is also #search

Lee

Fairly simple. Mostly Page class usage with some extensions of. 20 pages max. Some pages have relations to dataobjects - does FullTextSearch search these relations out of the box also or does that have to be set up?

nightjarnz

The answer is almost always solr, if you want reasonable search results.

nightjarnz

depending on your version of MySQL you can have a very... varied mix of results. But search should work out of the box for very simple sites.

Lee

@nightjarnz Sadly I'm on a hosted instance and unable to support Solr. So it looks like I'm stuck with what comes out of the box with SilverStripe.

Lee

HTTPS Question - I've configured my .htaccess file to redirect all requests to https. With no changes to the config it seems to work fine. But if I add Director::forceSSL() in the config file then my public assets stop getting served over https...