-
Notifications
You must be signed in to change notification settings - Fork 218
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
RUCSS wrong home_url detection with TranslatePress enabled #5640
Comments
Acceptance Criteria:
|
Scope a solutionTo fix that issue we can create a thridparty class that detect TranslatePress by checking if the constant add_filter('rocket_rucss_is_home_url', function( $is_home, $url ) {
$url_converter = new TRP_Url_Converter( new TRP_Settings() );
$language = $url_converter->get_lang_from_url_string($url);
$url_language = $url_converter->get_url_for_language($language);
return $url === $url_language ? $url_language : $is_home;
}, 10, 2); Estimate the effortEffort |
@piotrbak I am re-opening this one as the issue is still happening with According to @mostafa-hisham, we send the request to the queue which is for After adding On the first pass When retrying, only the I rolled back TranslatePress to |
Reproduce the issue ✅Identify the root cause ✅I think this is coming from the context, front or admin. When on admin the home URL is not rewritten, so we don't get the expected values. Scope a solution ✅There is a filter we can use, and that is already in use in other methods of the compatibility class Using We can do Estimate the effort ✅Effort [XS] |
Good catch @Tabrisrp Also I think we can use the method
[Enhancement] and I can see a room for enhancement by making private properties for mostly used variables like
and
this is used everywhere, what do u think? |
Scope a solutionThe first step will be to change the table to add a new For that we will have to change the The second step is to reuse that new logic inside the controller. Estimate effortEffort |
Sounds good. Just one quick though for the future: what if we add a third queue at some point? We would have to add another column to the datamodel. |
@MathieuLamiot We could do this but we send a boolean |
As @Mai-Saad stated that the issue was not reproducible on 3.15.4, we concluded to block it for the moment. |
Let's reopen it when needed |
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
RUCSS is failing for all language homepages when TranslatePress plugin is used.
This is the same issue as shared here: #5065
The same solution provided by Ahmed resolves the issue:
#5065 (comment)
To Reproduce
400 Bad json
error.Expected behavior
Used CSS should be generated with no issues for language homepages.
Additional context
Ticket: https://secure.helpscout.net/conversation/2102001423/390024/
Slack: https://wp-media.slack.com/archives/C029G1B5HD2/p1671727809871749
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: