Hi! There are some bugs with prefix routing and pagination. For short: It doesn't work for other prefix routes then the admin prefix.
I found a patch for this at the bug tracker (#5115), but it didn't worked for me. I've played a bit with router php and the patch, and got a version, that work's most the time for me! I don't think it is the right way to do it, but I attach the diff to this mail. It's my first diff, if it doesn't work, please tell me how to do a better one. Bye Marcus
--- router.php
+++ router.php
@@ -779,6 +779,24 @@
unset($url[$admin]);
}
}
+ // check for prefixes that are not 'Admin.routing'
+ $prefixes = array();
+ foreach ($_this->routes as $route) {
+ if (array_key_exists('prefix', $route[3]))
+ {
+ $prefixes[$route[3]['prefix']] = $route[3]['prefix'];
+ }
+ }
+ foreach ($prefixes as $cur_prefix)
+ {
+ if (!isset($url[$cur_prefix]) && !empty($params[$cur_prefix])) {
+ $url[$cur_prefix] = true;
+ $admin = $cur_prefix;
+ } elseif (isset($url[$cur_prefix]) && !$url[$cur_prefix]) {
+ unset($url[$cur_prefix]);
+ }
+ }
+
$plugin = false;
if (array_key_exists('plugin', $url)) {
@@ -810,7 +828,10 @@
$url = $originalUrl;
}
$named = $args = array();
+
+ // ME: Prefixes berücksichtigen
$skip = array('bare', 'action', 'controller', 'plugin', 'ext', '?', '#', 'prefix', $admin);
+ if (is_array($prefixes)) $skip = array_merge($skip, $prefixes);
$keys = array_values(array_diff(array_keys($url), $skip));
$count = count($keys);
smime.p7s
Description: S/MIME Cryptographic Signature
