Tips and Donation Feature - Request URL Issue

Hello,

I am new to ghost so please let me know if I can offer further clarification to my problem. Thank you.

Ghost Version
5.92.0

Node.js Version
18.20.4

How did you install Ghost?
Digital Ocean Ubuntu

Database type
MySQL 8

I have a self-hosted ghost install, and I updated ghost to include the tips/donation feature.
When I visit: https://domain.com/blog/#/portal/support, there is an issue with these two requests:

session/ | 404 | fetch | FeedbackPage.js:12
create-stripe-checkout-session/ | 404 | fetch | FeedbackPage.js:12

and I see this message in the browser:

Sorry, that didn’t work.
Something went wrong, please try again later.

The request urls look like this:

Request URL: https://domain.com/members/api/session/
Request URL: https://domain.com/members/api/create-stripe-checkout-session/

however I am expecting them to be:

Request URL: https://domain.com/blog/members/api/session/
Request URL: https://domain.com/blog/members/api/create-stripe-checkout-session/

as https://domain.com/blog is what is setup in my ghost config

Also, if I visit https://domain.com/blog/#/portal/signup

this request, for example, returns 204

Fetchmember/ 204 fetch FeedbackPage.js:12

with the following request url:

Request URL: https://domain.com/blog/members/api/member/

I am trying to understand why /blog/ is not being included in the requests sent when visiting
https://domain.com/blog/#/portal/support

For example, if I run curl -i https://domain.com/blog/members/api/session/ I get a 204 response.

Thank you for your help.

Michelle (and Sally - originally posted by my business partner Sally on github but not sure if this is a bug so it may be better to post here.)

To update - I am finding the same problem when I start fresh using the digital ocean droplet: Ghost | DigitalOcean Marketplace 1-Click App

I do the basic setup, with this type of structure: https://domain.com/blog, updating the config to include https://, and updating ghost to a newer version (in this case 5.95.0) which has the tip feature, connect stripe (not in test mode) and I include a button on the coming-soon page with:
https://domain.com/blog/#/portal/support

I click the button and the requests have the following urls and response:

Request URL: https://domain.com/members/api/session/
Request URL: https://domain.com/members/api/create-stripe-checkout-session/

session/ | 404 | fetch | FeedbackPage.js:12
create-stripe-checkout-session/ | 404 | fetch | FeedbackPage.js:12

Thank you again for any assistance you may be able to provide.

There’s a bug report open on this - looks like the subdirectory is a problem. Tips are a new feature so it’s likely to be quickly patched. :)

Reads carefully - sorry, yes, you posted it! :)

That is great news to hear! Thank you Cathy.

Hey @Michelle ,

Well, in the end, /I/ put in a patch for it. laughing

Assuming the Ghost team merges it, it should work once you update Ghost. (Not right now. Has to be merged and portal rebuilt.)

If you need it immediately, I built a test build of portal that fixes this bug. You can link to it by editing your config.production.json to include:

  "portal": {
    "url": "https://cathysarisky.github.io/temporary-builds/portal.min.js"
  }

^^ You’d splice that into the existing json, being sure to put a comma between it and any parts before/after it.

If it isn’t urgent, then you could just wait for the next release.

Thank you very much Cathy for your help! I really appreciate this solution. :grinning:

1 Like