Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moves code for handling redirects and unexpected request URLs out of Theme and into more appropriate locations #8427

Merged

Conversation

Sesquipedalian
Copy link
Member

@Sesquipedalian Sesquipedalian commented Jan 31, 2025

Fixes #8426
Fixes #8452

9662156 will probably also help avoid issues like this perennial problem when admins inconsistently use 'www.' in some of their settings but not all.

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian Sesquipedalian added this to the 3.0 Alpha 3 milestone Jan 31, 2025
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@live627
Copy link
Contributor

live627 commented Feb 3, 2025

The URL is no longer fixed when I request the page via 127.0.0.1 instead of localhost. Maybe we should ask @jdarwood007 to test aliases, too.

Ironic, isn't it?

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian
Copy link
Member Author

Derp. Fixed now.

@Sesquipedalian
Copy link
Member Author

Look good to you now, @live627?

@live627
Copy link
Contributor

live627 commented Feb 8, 2025

How do I add a forum alias? A search for alias in the ACP yields nothing. Do I need to ad one manually in the database then?

@Sesquipedalian
Copy link
Member Author

How do I add a forum alias? A search for alias in the ACP yields nothing. Do I need to ad one manually in the database then?

Looks like it, yeah. It appears to be a hidden setting.

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian
Copy link
Member Author

I have added more commits to fix #8452, because the fixes for that issue need to build on the other changes in this PR.

@Sesquipedalian
Copy link
Member Author

@Oldiesmann, can you confirm that this fixes #8452?

@Oldiesmann
Copy link
Contributor

@Oldiesmann, can you confirm that this fixes #8452?

PM previews are still broken but everything else works now. (Error from Firefox and Chrome)
image
image

@Oldiesmann
Copy link
Contributor

Previewing newsletters is also broken with the same error as above (just with a different URL)

@live627
Copy link
Contributor

live627 commented Feb 10, 2025

I set up a new virtual host (wamp server makes this very easy) pointing to SMF but none of the links change. I add a new setting forum_alias_urls with the value dev.local. Did I do it right? Am I missing something?

…age::isSimpleAction()

Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian
Copy link
Member Author

@Oldiesmann, those should both be fixed now.

Signed-off-by: Jon Stovell <jonstovell@gmail.com>

# Conflicts:
#	Sources/Actions/Admin/Members.php
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
@Sesquipedalian
Copy link
Member Author

I set up a new virtual host (wamp server makes this very easy) pointing to SMF but none of the links change. I add a new setting forum_alias_urls with the value dev.local. Did I do it right? Am I missing something?

Try now. I tweaked that code to be a bit smarter when I moved it, but in the process I forgot to consider the possibility that the values in that array might be just naked domain names or schemeless URLs.

@Oldiesmann
Copy link
Contributor

@Oldiesmann, those should both be fixed now.

  • I'll test when I get home tonight and let you know

@live627
Copy link
Contributor

live627 commented Feb 10, 2025 via email

Copy link
Contributor

@live627 live627 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works now

@Sesquipedalian Sesquipedalian merged commit 051b860 into SimpleMachines:release-3.0 Feb 11, 2025
6 checks passed
@Sesquipedalian Sesquipedalian deleted the 3.0/redirects branch February 11, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants