As an example, if the proper node URL is: http://www.example.com/World and a visitor accesses http://www.example.com/world, the end result is that http://www.example.com/World is generated and shown. However, the full view is actually executed twice: the first time unnecessarily in the background. To be clear: this is automatic redirect behavior native to eZ Publish, NOT any redirect behavior specified in templates or custom views.
Confirmed on eZ Publish 4.2, 4.4 and 4.5. We have verified this by adding some logging at the bottom of the pagelayout.tpl file and noting that the log occurs twice on such redirect pages. No template processing should take place on the "world" load; it should only execute on the "World" load.
This is a problem for 3 reasons:
1. Inefficient performance by loading all templates twice
2. Unpredictable cache block behavior, noted when cache blocks rely on ezpagedata() and/or persistent variable information, which is incorrectly generated in the "world" load.
3. Any important server-side code that should only be executed once on a page load is executed twice.
The diff below of a working but likely not completely efficient fix is on the community version of eZP 4.4.
- Add for example some bad syntax at the end of pagelayout.tpl, which will produce an error or warning
- Make sure that logging to file is enabled
- Create a folder name "World" (upper case)
- Access "/world" (lower case), get redirected to "/World"
- Note that the template error is logged twice; the pagelayout has been loaded twice.