Loading...
 
Skip to main content

Phplayers menu gives error and dies when user has no access to a page

Status
Closed
Subject
Phplayers menu gives error and dies when user has no access to a page
Version
1.9.x
Category
  • Error
Feature
Menu
User Administration (Registration, Login & Banning)
Templates (Smarty)
Site Identity
Resolution status
Duplicate
Submitted by
Hans Saelens
Lastmod by
Marc Laporte
Rating
(0)
Description

If a user has no access to a feature or a wiki page, normally the login page is shown. However, if the site has a phpLayers menu (E.g. {phplayers id=43 type=horiz} in Site Identity features - Custom Code - Content ), the phpLayers menu fails and dies. The user only sees a blank page with the message "LayersMenu Error: setMenuStructureString: empty string. Halted".

Solution

As a tempory fix, I added a line to lib/smary-tiki/function.phplayers.php. This way the phplayers menu does not halt, and the normal login screen is shown. In version 1.10, the line should be added to /tiki/lib/phplayers_tiki/tiki-phplayers.php instead.

include_once ("lib/phplayers/lib/PHPLIB.php");
include_once ("lib/phplayers/lib/layersmenu-common.inc.php");
include_once ("lib/phplayers/lib/layersmenu.inc.php");
include_once ("lib/phplayers/lib/".$types%22$type%22);
// beware ! that below is a variable class declaration
$class = $classes%22$type%22;
$phplayers = new $class();
$phplayers->haltOnError = "no"; // This line added by hsaelens
$phplayers->setDirrootCommon("lib/phplayers");
$phplayers->setLibjsdir("lib/phplayers/libjs/");
$phplayers->setImgdir("lib/phplayers/images/");
$phplayers->setImgwww("lib/phplayers/images/");
$phplayers->setTpldirCommon("lib/phplayers/templates/");

Importance
2
Priority
10
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
824
Created
Thursday 20 July, 2006 09:21:39 UTC
by Unknown
LastModif
Thursday 20 July, 2006 11:38:34 UTC


Show PHP error messages