Hi,

If there is a view with two displays, one has path "foo/bar" and the other has "foo/bar ", then it will cause the menu rebuild fail with a PDOException, and menu gets rebuild on every page load.

I attach the patch which cuts down the trailing spaces from menu paths.

CommentFileSizeAuthor
views_menu_rebuild.patch487 bytestamasd

Comments

dagmar’s picture

Status: Active » Needs review
dawehner’s picture

What about checking this on the validate function and removing the whitespace there,
but sure this doesn't matter that much.

tim.plunkett’s picture

Status: Needs review » Needs work
+++ b/plugins/views_plugin_display_page.incundefined
@@ -474,6 +474,9 @@ class views_plugin_display_page extends views_plug
         // automatically remove '/' from path.
         $form_state['values']['path'] = trim($form_state['values']['path'], '/');
 
+        // remove trailing spaces
+        $form_state['values']['path'] = trim($form_state['values']['path']);

This could be combined into:
$form_state['values']['path'] = trim($form_state['values']['path'], ' /');

dawehner’s picture

Priority: Major » Normal
Status: Needs work » Fixed

Fixed the comment from tim and just committed this to 7.x-3.x and 8.x-3.x

Afterwards this shouldn't be seen as major from my perspective.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.