Symbiote

Engineer the web, together.

Symbiote news

Keep in touch with what we're up to.

RSS available too if that's your thing!

The AJAX That Got Away

Nathan Glasl

Posted 10 Dec 2017

Updates

So for some reason, you're triggering an AJAX request on form submission. I'm not going to ask why, but I'm going to give you a little insight to your imminent doom. Everything looks good across multiple browsers. No issues on mobile devices. We're good to go, let's get this baby out to production. Suddenly, you hear the dreaded..

Some users are reporting issues.

What, only some users? How is that even possible? Well, turns out that when you trigger an asynchronous AJAX request on form submission, there's a chance that it never actually gets sent out. That's because there's a chance the page has already unloaded by the time it actually goes to send.

The simplest, immediate solution is to change your AJAX request over to be synchronous. This way the browser will make sure the request is actually fired before proceeding to submit the form.

Phew. Lucky you didn't actually deploy that to production right?

Some SilverStripe 4 Updates

Marcus Nyeholt

Posted 21 Nov 2017

SilverStripe 4 is here

After a long wait, SilverStripe 4 has been released; with it comes the process of updating modules...

Modules

We've got quite a few modules out there in the SilverStripe ecosystem, so whenever a new release of SilverStripe is made, particularly a major version, the excitement for new shiny things slowly gets replaced with apprehension of the technical debt of updates. Thankfully, the available tools to assist in updating modules have been a great help, making the process in the order of days instead of weeks for updating modules. So far, the following have been updated with SS4 versions; 

Note that the updated modules are now following the silverstripe-vendormodule installer method, meaning they'll appear under vendor/symbiote/silverstripe-{module} folders!

Hello Toby Lerone

Nathan Glasl

Posted 3 Nov 2017

On database restore...

Have you ever refreshed your project database, jumped onto the site and been presented with..

Hello Toby Lerone

I'm sorry, but you can't access that part of the CMS. If you want to log in as someone else, do so below.

I don't recall changing my name, so who is this, and why does it think that's who I am? Well, turns out when you refresh a database, if you happened to be logged in prior to it happening, the member IDs may not necessary line up anymore. For example, before..

ID

Name

500

My Default Admin


Then, after..

ID

Name

500

Toby Lerone

501

My Default Admin


The only way this actually happens is when you've logged in as someone that's no longer in the newly restored database, yet your session remains intact. In which case, you're likely to only ever see this on a development or testing environment. As a matter of process (to prevent this from happening), it's a good idea to logout and re-authenticate when refreshing development or testing environments.

Something to keep in mind the next time you're suddenly logged in as Heracles Warshawsky.