6.0.0-beta1
8/13/25

[#11708] Script error $(vbook_name) not found
Summary Script error $(vbook_name) not found
Queue Turba
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester heinz (at) htl-steyr (dot) ac (dot) at
Created 11/14/2012 (4655 days ago)
Due
Updated 11/14/2012 (4655 days ago)
Assigned
Resolved 11/14/2012 (4655 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/14/2012 10:47:35 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit b0dfaee659c7d1e5c52e95623dce8c013ab9cf72
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Nov 14 17:46:49 2012 -0500

     One more spot to check for vbooks.

     Bug: 11708

  turba/search.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/b0dfaee659c7d1e5c52e95623dce8c013ab9cf72
11/14/2012 10:43:26 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #4 Reply to this comment
Now in case of no shares

  if ($search_mode != 'duplicate') {
     echo $vbookView->render('vbook');
}

$vbookView is undefined!
11/14/2012 10:34:32 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #3 Reply to this comment
Thank you for the quick response :-)
11/14/2012 10:33:14 PM Michael Rubinsky Assigned to Michael Rubinsky
State ⇒ Resolved
 
11/14/2012 10:32:48 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 9c62b0d6c252f9fa8ae4ce8e8496238e196fe488
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Nov 14 17:31:38 2012 -0500

     Bug: 11708  Only include vbook if we have shares.

  turba/search.php |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/9c62b0d6c252f9fa8ae4ce8e8496238e196fe488
11/14/2012 08:00:03 PM heinz (at) htl-steyr (dot) ac (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Script error $(vbook_name) not found
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Hi

In turbas search.php the vbook-section is created:
/* The form footer and vbook section. */
if ($search_mode != 'duplicate') {
     $vbookView = new Horde_View(array('templatePath' => 
TURBA_TEMPLATES . '/search'));
     $vbookView->hasShare = $session->get('turba', 'has_share');
     $vbookView->shareSources = $shareSources;
     $vbookView->source = $source;
     
$page_output->addInlineScript('$(\'vbook_name\').observe(\'keyup\', 
function() { $(\'save-vbook\').checked = !!$F(\'vbook_name\'); });');
}

The addInlineScript() is executed unconditionaly and the "vbook_name" 
observer is defined

The $vbookView render reads the template vbook.html.php witch
creates a vbook_name input field only when $this->hasShare is set.

So if there are no shares configured the observer-script is added and 
the associated input field is missing.

Firefox dedects a script error and therefore in my case the 
turbaSearchCriteria field is empty

The InlineScript should only be added if shares are configured.

Heinz

Saved Queries