r3v3rb

Okay fixed by using SH_Constituent::class => SHConstituentCsvBulkLoader::class above

👍 (1)
nightjarnz

Even when you think it's not namespaces; it's namespaces 😂

r3v3rb

Clicking Import CSV results in an empty modal...

r3v3rb
  1. class ConstituentAdmin extends ModelAdmin
  2. {
  3. private static $menu_title = 'Constituents';
  4.  
  5. private static $url_segment = 'constituents';
  6.  
  7. private static $managed_models = [
  8. SH_Constituent::class
  9. ];
  10.  
  11. private static $model_importers = [
  12. 'SH_Constituent' => 'SHConstituentCsvBulkLoader'
  13. ];
r3v3rb
  1. class SHConstituentCsvBulkLoader extends CsvBulkLoader {
  2.  
  3. public $columnMap = array(
  4. // csv columns => SS DO columns
  5. 'Title' => 'Title',
  6. 'First_Name' => 'First_Name',
  7. 'Surname' => 'Surname',
  8. 'Address' => '->importOrAddAddress',
  9. );
  10.  
  11. public function importOrAddAddress(&$obj, $val, $record)
  12. {
  13. //Stub for now
  14. $address = SH_Address::get()->filter(['Address_Line_1' => $val])->first();
  15.  
  16. return $address;
  17. }
r3v3rb

Got to love SS4 - added new CSVBulkLoader to modeladmin and now have no csv file upload form field available!

rasmniel

Anyone well versed in the Subsites module? I've got a production site running, where one subsite suddenly stopped respecting the assigned theme and will now only use the main theme. Does anyone have a clue why this is happening? I can create new subsites with appropriate themes and the remaining handful of subsites are respecting their assigned themes 🤔😭

wmk

I have some subsites running, though I normally have a global theme for all sites. Any chance to debug this? I bet it's some configuration issue.

rasmniel

Thanks for the response. I found that the reason was a malconfigured SiteConfig for the given subsite, where the Theme field was somehow set to an incorrect value, despite the field being hidden for as long as I can remember. Was an easy fix changing the value in the database 🙂👍

wmk

Perfect you got it running. Happy new year btw!

zauberfisch

@Firesphere

Firesphere

If it works for you, it works for you mate 🙂 Downside to me is the "local only" storage. And I agree, the limitation towards direct messages is a thing 😕

Firesphere

I'm not entirely sure if my archive can help there, because... well, I don't want the bot to have access to DM's and stuff, because that would violate the privacy policy 😕

cwc

Hi folks, happy new year. Would like to check if there is a timeout of 10s for ajax requests in the backend. Was trying to add additional oembed providers and was toying ard when I realized putting a sleep(10) to ajax requests will cause a error 500. Anyway/where to change this if so? Thanks

Nvm, figured it as a option setting in Embed/Embed’s curldispatcher