Broken links in subfolder installs


(cpradio) #1

The following templates reference /my/... for the URL

  • discourse_narrative_bot.advanced_user_narrative.start_message
  • discourse_narrative_bot.advanced_user_narrative.change_topic_notification_level.reply
  • system_messages.welcome_tl1_user.text_body_template

Other translations are handling this correctly by using %{base_url}/my/... so that it puts the correct domain/subfolder in the URL. Examples below:

  • badges.autobiographer.description
  • badges.autobiographer.long_description
  • system_messages.email_revoked.text_body_template
  • system_messages.new_user_of_the_month.text_body_template
  • system_messages.usage_tips.text_body_template

I uncovered all of these searching for /my/ in the templates, there could be others.

I’ve modified the templates in question on our installation to have /community/my/... as I didn’t want to assume the %{base_url} variable would be available. Which gets our community around it for now.


(Régis Hanol) #2

There’s already a PR about that specific issue

Needs some more work though.


(cpradio) #3

Ah, I thought this felt familiar, but for the life of me couldn’t find the topic on it. :slight_smile:


(Jay Pfaffman) #4

Another solution, that I think I’ve used before, is to do the redirect from /my/ to /community/my/ is to do it with an nginx redirect.


(cpradio) #5

Sadly, that is outside of what I have access to. I only run the Discourse instance and by run, I mean purely from the Discourse Software. I do not have access to the infrastructure or our proxy setups.


(Jay Pfaffman) #6

I’m not sure it’s sad. :wink:

Even if you could do it that way, I wasn’t suggesting that you change your functional work-around to a different one! I just added it in case it’d work for someone else.

Sounds like it’ll be fixed before a whole lot longer anyway.


(cpradio) #7

I’m actually not too terribly saddened by it anyway. I really do not have the time to manage the lower level of the community as it is.


(Ken Snider) #9

Using v2.2.0.beta3 +166, Subfolder install.

Receiving these errors in the admin:

POP3 authentication failed. Please verify your pop3 credentials.
Email polling has generated 162 errors in the past 24 hours. Look at the logs for more details.
Connection to the POP3 server is failing with an authentication error. Please check your POP3 settings.

(Corrected) POP3 error aside, there are two links in the message, one to “the logs”, one to “POP3 settings”, both of which omit the subfolder.


(Gerhard Schlager) #11

Most of the relative links reported in this topic where already fixed in September. Today, I fixed the rest of them and added specs to prevent us from adding broken links in the future.

And, because I really like our translators, I made sure that the new interpolation keys were added to all existing translations – even on Transifex. :slight_smile:


(Gerhard Schlager) #12

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.