DragonByte Tech
Well-known member
- Affected version
- 2.2.8pl1
Defining the following two routes:
#1
#2
Will both write to
Suggested solution:
In
Replace with:
This will cause #1 to write to
#1
#2
Will both write to
api_dbtech-ecommerce_categories_.json
.Suggested solution:
In
/src/XF/DevelopmentOutput/Route.php
find:
PHP:
$subNameFile = preg_replace('#[^a-z0-9_-]#i', '-', $subName);
Replace with:
Code:
$subNameFile = preg_replace('#/$#i', '_', $subName);
$subNameFile = preg_replace('#[^a-z0-9_-]#i', '-', $subNameFile);
This will cause #1 to write to
api_dbtech-ecommerce_categories_.json
and #2 to write to api_dbtech-ecommerce_categories-.json
, preserving the uniqueness of these routes.