on GridField i have a ActionMenuItem that duplicates the row, which works but i get the "Do you want to leave the page" when clicking on a row. Where does this modal come from?

you might be able to but i don't think you should - you should put redirection in a controller, e.g.

  1. if (!$record->canEdit($member)) {
  2. // redirect
  3. }

Can i redirect to the url inside the Datamodel function public function canEdit($member = null) {}

  1. [Thu Jan 17 23:49:57 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0
  2. [Thu Jan 17 23:49:58 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  3. [Thu Jan 17 23:49:59 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  4. [Thu Jan 17 23:49:59 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  5. [Thu Jan 17 23:50:09 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  6. [Thu Jan 17 23:50:10 2019] [error] [client 99.117.83.94] Premature end of script headers: php72.cgi, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  7. [Thu Jan 17 23:50:10 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10
  8. [Thu Jan 17 23:50:17 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/1
  9. [Thu Jan 17 23:50:17 2019] [error] [client 99.117.83.94] PHP Warning: Module 'fileinfo' already loaded in Unknown on line 0, referer: https://lonestarleaders.com/admin/pages/edit/show/10

this might help: https://stackoverflow.com/a/36455035/2812842 (edited)

Attachments:
Stack Overflow  
PHP Warning: Module already loaded in Unknown on line 0

so basically somehow I am loading PHP Module fileinfo twice?

  1. [Fri Jan 18 00:17:59 2019] [error] [client 99.117.83.94] Premature end of script headers: php72.cgi, referer: https://lonestarleaders.com/admin/pages/
  2. [Fri Jan 18 00:23:12 2019] [error] [client 99.117.83.94] Premature end of script headers: php72.cgi, referer: https://lonestarleaders.com/admin/pages/
  3. [Fri Jan 18 00:23:49 2019] [error] [client 99.117.83.94] Premature end of script headers: php72.cgi, referer: https://lonestarleaders.com/admin/pages/

now just these errors, which are seem to be related to the screenshot i posted above while trying to use the CMS


VM4084:8240 GET https://lonestarleaders.com/admin/pages/treeview 500 (Internal Server Error)

no idea sorry, it's hard to tell from the screenshot

The 500 error should be showing something either in the error logs on the server, of if you have a look at the request/response in network tools on your broswer

(2)

If the site is in dev mode, there should be a stack track in the response. If there's not, then it's probably something more fundamental and the server log should tell you

(2)

You know what the fix was? i forgot to add public to the end of the "Home Directory" in my Dreamhost setup panel

now both my sites server error logs are clean and the CMS works

🎉 (1)

lmao yeah that'll do it. Nice troubleshooting dude!

I know, pretty silly mistake from me...but had SS not changed it's framework people like me wouldn't have to worry about that kind of new change to the process


ops i think @kinglozzer already made https://github.com/kinglozzer/silverstripe-tinypng (edited)

Attachments:
kinglozzer/silverstripe-tinypng

sometimes client are so lazy to optimise image before uploading to CMS

like this https://github.com/rsmclaren/silverstripe-kraken but for SS 4 (edited)

Attachments:
rsmclaren/silverstripe-kraken

Hi guys do you have suggestion for image optimisation module?