πŸ’… M.academy's new look & feel, Magento's APSB24-40 security patch, and a MySQL trick


Aug 2024

​

Read by 9,000+ Magento developers.
​Send to a friend.​

Complete M.academy refresh

Hey friend,

It's been a few years since M.academy launched, and I thought it was time that our image got a bit of a refresh. So over the summer, I worked on a few things:

  • A refreshed website and updated tagline: Lots of energy, bright colors, and a new focus on "mastering" Magento development rather than simply learning the fundamentals -- since there are already courses for all of those πŸ˜‰
  • An updated look & feel in our course platform, our Campus community, and emails with improved mobile design (with the latter still being wrapped up), as I know many of you read Segment on your phone.
  • A makeover for Maggie (more info on that below ↓).

I hope you can take a few minutes and check out the updated look & feel of the site:

I'm now switching gears to developing all new courses & lessons.

The biggest thing that I've heard from almost everyone is that you "just want more!", so that is what I'll be working on for the foreseeable future. Our new mission of helping you not just learn Magento, but master it, definitely helps refine this as my primary focus. So look for a variety of new lessons, courses, and much more on the way.

While I research & write up lesson plans for new courses, I'll also be wrapping up my cert-prep course and exam portal, which is the next big thing coming. I know you'll love it! And it also lays the groundwork for some other cool tools coming later.

Please reply back and let me know what you think of everything!

Keep coding,
-M

​

Mark Shust

Teacher / M.academy
6X Adobe Commerce Certified

​Say hi on X or connect on LinkedIn​

​


In this issue

​

New technical Magento post

Magento APSB24-40 Security Patch: CSP and Checkout Updates


Upsert SQL Snippet

ON DUPLICATE KEY UPDATE


Module of the week

Fisheye URL Rewrite Optimizer


Course spotlight

Queue things up for efficiency and reliability


Magento meme time

Magento cache debugging

Our Magento AI tutor got a makeover!

Meet Maggie, the AI-Powered Magento Mentor

As part of our streamlined update, Maggie also got a bit of a makeover. Maggie is a big part of M.academy's mission, and it felt only right to extend the look and feel update to her as well, making her a bit more friendly and personable. So many students have been so extremely happy to have her as their Magento tutor, and we hope you also get a chance to experience her first-hand.

Maggie is like having a Magento expert at your fingertips. She breaks down complex topics into easy-to-understand explanations, can write up code examples, and can speak over 70 languages, which means that you can talk with her in your native tongue, and she'll chat back in the same language. Maggie is available on every premium course at M.academy.


New technical blog post

Magento APSB24-40 Security Patch: CSP and Checkout Updates

Let’s talk about something really important that you need to be aware of: the Magento APSB24-40 security patch.

Now, I know what some of you might be thinking. β€œAnother security patch? Don’t we have enough of those already?” And you’re right, as it can feel like we’re constantly chasing our tail at times with these updates. But this one is one of the more critical updates to be aware of.

Released in June 2024, this patch addresses several vulnerabilities in both Adobe Commerce and Magento Open Source. But this patch introduces some major changes to how Magento handles Content Security Policy (CSP), and these changes directly impact functionality around the checkout.

I’ve been working with Magento for a while, and I’ve seen first-hand how updates like this can catch people off guard. But whether you’re running a small boutique store or managing a large eCom operation, understanding and implementing this patch is absolutely crucial for keeping your site secure and running smoothly.

Upsert SQL Snippet

ON DUPLICATE KEY UPDATE

Ever heard of "ON DUPLICATE KEY UPDATE"?

It's a MySQL secret sauce clause 🌢️

If you've ever wanted to upsert data... this is how you do it in MySQL.

Say you're inserting data into the core_config_data table. Normally, you'd use a standard INSERT INTO statement.

But what if that data already exists?

That's where ON DUPLICATE KEY UPDATE comes into play.

When you append this clause to the end of your INSERT statement, MySQL first attempts the insert. If it hits a duplicate key (in this case, the compound index of scope, scope_id, and path), instead of throwing an error, it converts the INSERT into an UPDATE, which updates the data for the related index.

As a Magento developer, you can use the above line to upsert configuration data without worrying about creating duplicate entries. It's a simple one-liner that handles both inserts and updates.

Module of the week

Fisheye URL Rewrite Optimizer

Are your Magento 2 URL rewrites out of control?

Is url_rewrite bloated with unnecessary path rewrites?

The Fisheye_UrlRewriteOptimiser module prevents creation of unnecessary URL rewrites for products with category paths when disabled.

Course spotlight

Queue things up for efficiency and reliability

Message queues are a relatively unused feature in Magento, but they can be extremely useful when it comes to performance scaling and executing bulk operations.

There are a lot of queue concepts and terminology which can be SO overwhelming to learn, but don't worry; I used my simplification superpower to the max in this course, so you can quickly & easily master this topic.

And did I mention that single course enrollments are back? They are, so you can now enroll in this specific course if you missed your chance before. This course is a bit over 2 hours, so it's right in that sweet spot of enough, but not too much.

Magento meme time

Magento cache debugging

​

So much has changed in this Segment, so I'd love to hear what you think of the new format! Please let me know by either voting below or replying to this email.

​

M.academy​
8940 Sassafras Cir, N. Royalton, OH 44133

Join Segment, the Magento newsletter

Join Segment, M.academy's free monthly newsletter about Magento, read my thousands of developers & merchants to keep in touch with the industry. Check out previous issues of Segment by clicking the Posts tab below πŸ‘‡

Read more from Join Segment, the Magento newsletter

This hasn't been a quiet week by any means, even in Magento land. Before we get to the guts of this issue, which is all about how to debug and troubleshoot product collection issues, I need to let you know about urgent security exploit that needs to be addressed. But first, a word from our sponsor. If you are interested in order fulfillment, check out Portless: Sponsored by Portless Skip the ship, unlock cashflow and scale globally in less time Discover the future of e-commerce logistics with...

I hope everyone is having a great summer and able to take some time off! After a few meh summers, we've been enjoying some 90+ degree days in Cleveland, Ohio, and it's wonderful. I always see summer as a bit of a break from the normal coding routine, a chance to get outside of our heads and clear my mind -- a bit like starting a new year. Anyone relate? This Segment is about a new feature available in PHP 8.3. But first, a word from our sponsor: Sponsored by Portless Skip the ship, unlock...

Redis adopts dual-source licensing

There was a big of drama with Redis the last few weeks regarding updates to its licensing, Magento 2.4.7 was released, and we got some numbers released to us about HyvΓ€ installations. Let's get to it πŸ˜„ πŸ₯³ What's new in Magento 2.4.7 I always cover what's new and interesting with new Magento releases, and 2.4.7 was just released last week. If you want to know everything notable in this release (and skip all the boring stuff), check out my newest video which will inform you about anything new in...