URL Might Double Domain If Filename Empty
So with the following configuration, we might have a doubled domain bit in the URLs for non-top-level areas and regular pages:
- URL Format: /wiki-filename/Article
- Wiki Filename: (empty)
Fixed in the next release. This is a rare configuration, so the upgrade script will not rebuild URLs automatically.
In
vault/core/model/url/vw.php, find:
Code:
$parent_path = $parent['url'];
$basebits = explode('/', $parent_path);
array_pop($basebits);
$parent_bit = array_pop($basebits);
if ($parent_bit)
Replace with:
Code:
$parent_path = $parent['url'];
$prot_pos = strpos($parent_path, '://');
if ($prot_pos)
{
$parent_path = substr($parent_path, $prot_pos + 3);
}
$basebits = explode('/', $parent_path);
array_shift($basebits);
array_pop($basebits);
$parent_bit = '';
if ($basebits)
{
$parent_bit = array_pop($basebits);
}
if ($parent_bit)
After upgrading or applying this patch, affected installations should rebuilds URLs manually in Admin Panel > Maintenance > Counters > Rebuild URLs.