Garry Yeatman

Hi people, I am having an issue with CSVBulkLoader. I have an object with some DB fields, a couple of has_ones and some many_manys. I have included the ID in my csv to allow the user to edit rows and create new objects by leaving the ID blank in the csv.

The problem I am having is that when I run my import, two new objects are created. one with the DB fields filled out and no relationships added. The second object is the opposite, the object has no DB fields filled but all of the relations are added as expected. I have tracked my issue down to processRecord on line 219 (SS3) in the CSVBulkLoader.php file.

It appears to run two foreach loops which I believe is where my two objects are being created. If I combine these two for each loops together (Appending the second to the first), it all works well.

Has anyone come across something similar as would know a fix or work around? I don't really want to extend this CORE functionality for such a minor change.

Thanks

Chris

it works if i add the extension to the PageController though instead of the Security controller

Chris

I'm just trying to make a couple http requests (third party) and show some data on the login template. It seems like extending the Security controller has no affect on the templates at all, even with basic tests like echoing "hello"

Chris

Is it possible to add custom methods to the Security controller for use in the security templates? (_login, _lostpassword, etc). I've tried adding an Extension to SilverStripe\Security\Security but no luck. Is the login form template loaded from a different controller?

dorsetdigital

Then you just need to add the right code to your page template. Where that goes specifically will depend how the site is built, but it will be in the templates directory, possibly in http://Page.ss or maybe in a footer include or similar

dorsetdigital

You need to decide how the popup is to be triggered (bear in mind, automatic pop-ups are hated by most web users)

dorsetdigital

OK. https://getbootstrap.com/docs/4.3/components/modal/ Bootstrap can provide the pop-up, etc. out of the box

Show 1 attachment(s)
getbootstrap.com  
Modal

Use Bootstrap’s JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.

Hide attachment content