gonza.ar
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] GRoups priorityHi,
Here is an example:
We have 40 groups with 30 rules each.
In the last group (Z) we have the following rule in the position 20 :“^(?i)test(.*)/?$” “/” [R=301,L]
we have in the second group (B) the following rule in the position 30:
“^testguest/?$” “https://test.com/test” [R=301,L]
For the plugin, the rule of the group Z will be first because was created first, but we don’t want that. Of course I can just change the position of the rule in the second group to 19, and then the plugin will take the rule of the group B first.
The problem is that we have 1200 rules, and every day we add and remove rules, will be hard to follow the position of the rules.For this reason I think that having orders in the groups, in addition to the orders of the rules within the groups, would be a great functionality.
Regards
Forum: Plugins
In reply to: [Redirection] GRoups priorityJohn,
The responose of the function “get_for_matched_url”
I would like to know if there is a hook after the function that does that query to organize the response of possible all redirects that match the URL.Regards
Forum: Plugins
In reply to: [Redirection] GRoups priorityHi John,
Thanks for the reply, yes, we have complex rules and these rules follow priorities.
Is there a hook that allows me to alter the response ?Regards
Forum: Plugins
In reply to: [Redirection] GRoups priorityHi John,
The problem is that it is difficult to follow the position of the rules when we have a lot. For example. we have 45 groups and 40 rules in each one. If we need to add a rule that needs to be validated before another rule, it will be difficult to find the position of the rules with similar matches, and it will also be difficult to reposition them.
is there any way that the plugin solves it in another way?
REgardsForum: Plugins
In reply to: [Redirection] GRoups prioritypublic static function get_for_matched_url( $url ) { global $wpdb; $url = new Red_Url_Match( $url ); $sql = "SELECT {$wpdb->prefix}redirection_items.*, {$wpdb->prefix}redirection_groups.position FROM {$wpdb->prefix}redirection_items JOIN {$wpdb->prefix}redirection_groups ON {$wpdb->prefix}redirection_items.group_id = {$wpdb->prefix}redirection_groups.id WHERE match_url=%s OR match_url='regex' ORDER BY {$wpdb->prefix}redirection_groups.position asc"; $rows = $wpdb->get_results( $wpdb->prepare( $sql, $url->get_url() ) ); $items = array(); if ( count( $rows ) > 0 ) { foreach ( $rows as $row ) { $items[] = new Red_Item( $row ); } } usort( $items, array( 'Red_Item', 'sort_urls' ) ); return $items; }
Forum: Plugins
In reply to: [Redirection] GRoups priorityHi!
There is a position column in the wp_redirection_groups table, but it is not queried at request time for all matching URLs.
with just adding a joing and order by that position wil order all the rules following the groups order.
I mean:
file: plugins/redirection/models/redirect/redirect.php
function: get_for_matched_urlchange:
SELECT * FROM {$wpdb->prefix}redirection_items WHERE match_url=%s OR match_url='regex'
to
SELECT {$wpdb->prefix}redirection_items.*, {$wpdb->prefix}redirection_groups.position FROM {$wpdb->prefix}redirection_items JOIN {$wpdb->prefix}redirection_groups ON {$wpdb->prefix}redirection_items.group_id = {$wpdb->prefix}redirection_groups.id WHERE match_url=%s OR match_url='regex' ORDER BY {$wpdb->prefix}redirection_groups.position asc
- This reply was modified 4 years, 4 months ago by gonza.ar.
Forum: Plugins
In reply to: [Redirection] “All Groups” filter problemNote: I have a pagination of 25 items
- This reply was modified 4 years, 4 months ago by gonza.ar.
Forum: Plugins
In reply to: [Redirection] Redirect ^ (anchor) problemJohn,
yes you′re right.
Thank you very much for your help!Forum: Plugins
In reply to: [Gutenberg] gutenberg default installed with newest wp?Hi!
This version has many bugs fixed. What are the plans to update the version that comes with the core?
Regards
Forum: Plugins
In reply to: [WPSiteSync for Content] WPSiteSyncContent is undefinedHi!
Yes, I saw the errors in the developer console of the browser, but I can’t reproduce it again. I’m going to reply if happens again with a screenshot.
Regards
- This reply was modified 6 years, 1 month ago by gonza.ar.
Any updates on this? is not working
Forum: Plugins
In reply to: [The Events Calendar] PLEASE NOTE: Issues with Google Maps Not WorkingHi ggwicz!
I followed all the steps and is not working.
The function enqueue_map_scripts is never called