MailGun Integration

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I'm getting this error on a page with a REST API model pointing to MailGun.

1. METHOD NOT ALLOWED: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <title>405 Method Not Allowed</title> <h1>Method Not Allowed</h1> <p>The method GET is not allowed for the requested URL.</p>

Except, I'm not trying to make any GET requests.

The only method I have on the model is a POST request:



What's going on here?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Are you getting this error in the Page Composer or at runtime?

What version of Skuid are you running?
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
runtime

7.20
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
That's really strange. Can you make sure that "Load Model data on page load" is un-checked? If you're doing a "Create-only" REST Model as it appears you're doing here, you probably want "Load Model data" OFF and "Create default row" ON.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I don't see a load model parameter:

Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
Okay, I've recreated this. To fix, follow these steps:

1. Add a new method to your Model of type "Query"
2. Go to your Model's properties and Uncheck "Load Model data on page load" (which will now be visible because you have a query method defined)
3. Remove the Query method.
4. Save your page and preview.

Ultimately we need to prevent this from happening, probably by automatically un-checking the "Load Model data" property if you change a Method's type and you're left without a "Query" Method, in which case there's no method defined that could be used for Skuid to load data into the model.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Thanks!