Navigation Menu

Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Statusfy breaks when in a subfolder #163

Closed
1 task done
weeblr opened this issue Mar 15, 2019 · 10 comments
Closed
1 task done

Statusfy breaks when in a subfolder #163

weeblr opened this issue Mar 15, 2019 · 10 comments

Comments

@weeblr
Copy link

weeblr commented Mar 15, 2019

  • I confirm that this is a issue rather than a question.

Bug report

When installed in a subfolder (ie https://status/example.com/company1), several things break as links to assets or other pages do not expect this.

Version

0.3.0.beta1 (also with previous 0.2.x)

Steps to reproduce

Install in a subfolder

What is expected?

All links work normally.

What is actually happening?

  • Logo is a 404, it links to /static/img/xxxx.png instead of /subfolder/static/img/xxxx.png or use a fully qualified link
  • Link to History is a 404

They all link to /xxxx instead of /subfolder/xxxx.

Other relevant information

  1. I'd suggest the baseURL is used to prefix all those links. Best would be to automatically determine the subfolder by separating the domain from the baseUrl. Or else a secondary config option can be added, ie baseURL = https://status.example.com + baseFolder = /company_A/department_1

  2. Using a subfolder is common when hosting pages on Gitlab

  • Your OS: N/A
  • Node.js version: N/A
  • Browser version: N/A
  • Is this a global or local install? N/A
  • Which package manager did you use for the install? N/A
@open-collective-bot
Copy link

Hey @weeblr 👋, Thank you for opening an issue.

Check out our OpenCollective and consider backing us. Help us to continue developing this Amazing Project, we will appreciate it ❤️.

You can contribute from $2 🤓, less than a cup of coffee ☕ 😃

https://opencollective.com/statusfy

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us 😄

@weeblr
Copy link
Author

weeblr commented Mar 15, 2019

A bit more digging: some links are correct and some are wrong:

elements:
alternate | https://status.example.com/weeblr/feeds/incidents.en.xml (application/rss+xml)
-- | --
alternate | https://status.example.com/weeblr/feeds/incidents.en.atom (application/atom+xml)
apple-touch-icon | /static/icons/icon_512.cYMpj1By2g0.png
icon | /static/icons/icon_16.cYMpj1By2g0.png
icon | /static/icons/icon_120.cYMpj1By2g0.png
icon | /static/icons/icon_144.cYMpj1By2g0.png
icon | /static/icons/icon_152.cYMpj1By2g0.png
icon | /static/icons/icon_192.cYMpj1By2g0.png
icon | /static/icons/icon_384.cYMpj1By2g0.png
icon | /static/icons/icon_512.cYMpj1By2g0.png
preload | /static/735eebfff243660d13be.js
preload | /static/ce19037f8953cdde44a2.js
preload | /static/b4cbd316a18fcb22032e.js
preload | /static/96a5fbe5ae2bab709c52.js
preload | /static/5a21c58ab4758057a595.js
shortcut icon | /static/icons/icon_16.cYMpj1By2g0.png

Images:

Images |   | https://status.example.com/static/img/0499156.pngResponse code: 404
-- | -- | --
Images |   | https://status.example.com/static/icons/icon_16.cYMpj1By2g0.pngResponse code: 404
Images |   | https://status.example.com/static/icons/icon_512.cYMpj1By2g0.pngResponse code: 404

@juliomrqz
Copy link
Owner

Hello, @weeblr.

My team and I evaluated the use of the "subpaths/subfolders", and agreed to remove the support for them for these two reasons:

  • The framework we use as a base (Nuxt.js) does not implement the "subpaths/subfolders" correctly (for our requirements), and fixing this issue requires several tweaks that make the code even more complex.
  • One of the recommended practices for "Status Page Systems" is to place them in a sub-domain or a different domain, so the subpaths are not very useful.

The next stable release (v0.3.0), will include this change.

@weeblr
Copy link
Author

weeblr commented Mar 20, 2019

Hi Julio

Then you should remove from documentation the ability to host on Github and Gitlab pages (at least, did not checked other hosting solutions). That won't work, they are in subfolders in most cases (ie url is: group.domain.com/pages-project-name)

From Statusfy own documentation:

If you don't have any custom domain, set the correct baseUrl in config.js. For example, if you are deploying to https://.gitlab.io//, (i.e. your repository is at https://gitlab.com//), you can set baseUrl to "//" or "https://.gitlab.io//" (recommended).

I guess Statusfy just lost a lot of interest for a lot of people without GitHub or Gitlab hosting ;)

Best regards

@juliomrqz
Copy link
Owner

juliomrqz commented Mar 20, 2019

You can still use those services, but you will have to set up a custom domain for Github or Gitlab 🤓.

@weeblr
Copy link
Author

weeblr commented Mar 20, 2019

Hi

That's not possible if you run your own Gitlab as many people do and you already are on a custom domain, ie pages are at group.our_custom_domain.com/status/

Best regards

@juliomrqz
Copy link
Owner

There are other free services you could use as an alternative: Firebase, Heroku, Surge, Netlify or Now. They also provide you an URL for your deployments.

@weeblr
Copy link
Author

weeblr commented Mar 20, 2019

That'd be adding another layer/supplier to something that does not need it: we use Gitlab for everything and it already provides all that's needed.
No worries, that's your call. I feel a bit sorry I wasted that time I spent on Statusfy, still happy that you implemented Scheduled incident.

Statusfy just won't cut it for us, we'll have to stick to Cachet.

Best regards

@juliomrqz
Copy link
Owner

Sorry to hear that. You could create a new issue describing why this is important. If this gets enough interest from the community, we can add support to sub-paths when we start working on this issue #158.

@weeblr
Copy link
Author

weeblr commented Mar 22, 2019

Hi

I have done so in #171

Best regards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants