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

[BUGFIX] Get correct page id for a shortcut #672

Closed

Conversation

KrohnMi
Copy link
Contributor

@KrohnMi KrohnMi commented Nov 12, 2023

When creating a shortcut in TYPO3 that points to a different root page, an incorrect link is generated.

I hope I have fixed it correctly.

@coveralls
Copy link

coveralls commented Nov 12, 2023

Pull Request Test Coverage Report for Build 6850008836

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.008%) to 63.336%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/Event/Listener/AfterLinkIsGeneratedListener.php 3 4 75.0%
Totals Coverage Status
Change from base Build 6785936861: 0.008%
Covered Lines: 824
Relevant Lines: 1301

💛 - Coveralls

@KrohnMi KrohnMi force-pushed the BUGFIX/fix-page-for-shortcut branch from e754175 to a980f79 Compare November 12, 2023 18:56
Copy link
Collaborator

@lukaszuznanski lukaszuznanski left a comment

Choose a reason for hiding this comment

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

Could you cover this with tests?
By the way: is this really an issue? I mean, it's OK to have id of shortcut page, as it's redirected by 307 HTTP to other page, or I don't understand your issue.

Classes/Event/Listener/AfterLinkIsGeneratedListener.php Outdated Show resolved Hide resolved
@KrohnMi
Copy link
Contributor Author

KrohnMi commented Nov 13, 2023

@lukaszuznanski

My use case involves two Typo3 root pages in one backend, let's call them Page A and Page B.

On Page A, i'm building a menu using the Menubuilder, and within this menu, i have links to Page B. In the Typo3 site config, i have defined the frontend URL as a.site.com and the backend URL as api.a.site.com. Similarly, Page B has frontend URL b.site.com and backend URL api.b.site.com.

When i build the menu, the links are generated as a.site.com instead of the expected b.site.com. This is happening because the Site Configuration of Page A is being used to get the frontend url, and Page B's Site Configuration is not being used as expected.

@twoldanski
Copy link
Collaborator

Hi @KrohnMi thanks for PR, but can you please test you issue with this PR #675 (should solve you issue as well)

@lukaszuznanski
Copy link
Collaborator

@KrohnMi please check if #675 fixes your issue

@KrohnMi
Copy link
Contributor Author

KrohnMi commented Nov 14, 2023

@twoldanski No, unfortunately, your merge request could not resolve my issue.

@twoldanski
Copy link
Collaborator

Hi @KrohnMi could you provide example typoscript to reproduce your issue?

@lukaszuznanski
Copy link
Collaborator

@KrohnMi please provide some examples so we can reproduce this issue

@lukaszuznanski lukaszuznanski added the bug Something isn't working label May 9, 2024
@twoldanski twoldanski closed this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants