Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:59:25 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155551 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: WB282 Bug?  (Read 1356 times)
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« on: August 29, 2011, 08:25:12 PM »

using wb282 inluding fixes, using wb_theme in backend.

to recreate:
1 - create usergroup
2 - save
3 - modify usergroup
4 - click advanced options - error will show:
Quote
Notice: Undefined variable: admin in E:\xampp-nw\htdocs\wb282fixed\admin\groups\groups.php on line 190

Error doesn't show when clicking advanced options during creation, only during modifying existing group.

Logical error, the variable $action is NOT set in theme/groups_form.htt

The test: /admin/groups/groups.php -> line 25
// Set parameter 'action' as alternative to javascript mechanism
Code:
$action = (isset($_POST['modify']) ? 'modify' : $action );
$action = (isset($_POST['delete']) ? 'delete' : $action );

The form: /templates/wb_theme/templates/groups_form.htt -> line 283
Code:
<form name="advanced" action="{ADVANCED_ACTION}" method="post">
        <input type="hidden" name="group_id" value="{GROUP_ID}" />
        <input type="hidden" name="action" value="modify" />
{FTAN}
        <input type="submit" name="advanced" onclick="window.location = '{ADVANCED_LINK}';" value="{ADVANCED_BUTTON}" />
    </form>

Solution:
1 - add line to groups.php,
$action = (isset($_POST['action']) ? 'modify' : $action );

2 - change the backend templates (all of them!) templates/groups_form.htt
from: <input type="hidden" name="action" value="modify" />
to: <input type="hidden" name="modify" value="modify" />

But solutions didn't work, they'll end up in Security Offense Access Denied messages.

There is another error,
Code:
$template->set_var( array(
'ACTION_URL' => ADMIN_URL.'/groups/save.php',
'SUBMIT_TITLE' => $TEXT['SAVE'],
'GROUP_ID' => $group['group_id'],
'GROUP_NAME' => $group['name'],
'ADVANCED_ACTION' => 'groups.php',
'FTAN' => $admin->getFTAN()
));
should be:
Code:
$template->set_var( array(
'ACTION_URL' => ADMIN_URL.'/groups/save.php',
'SUBMIT_TITLE' => $TEXT['SAVE'],
'GROUP_ID' => $admin->getIDKEY($group['group_id']),
'GROUP_NAME' => $group['name'],
'ADVANCED_ACTION' => 'groups.php',
'FTAN' => $admin->getFTAN()
));
Notice the missing GetIDKEY on the groups_id.


Now it works.

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7973



WWW
« Reply #1 on: August 29, 2011, 08:47:11 PM »

Hello John,

did you try the actually SVN 1506. This should already be fixed in this version and also a nice feature with deleting users is included.

Matthias
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2859



WWW
« Reply #2 on: August 30, 2011, 11:30:22 AM »

Didn't try the SVN, and indeed I totally forgot to have a look there.

If it is known, no probs.

John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #3 on: September 01, 2011, 11:10:55 AM »

This should be fixed in the official downloads as well. I installed fresh one yesterday and it has this bug. Luckily I found this thread and a fix looks to be available. So let's try that. But this is a major bug and you can't expect regular users to use SVN versions.
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #4 on: September 01, 2011, 11:38:05 AM »

Actually, I don't understand this SVN thing myself. How can I download the changed files from rev 1480 until now?
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
DarkViper
Development Team
*****
Offline Offline

Posts: 1253


« Reply #5 on: September 01, 2011, 12:25:49 PM »

we're working on to publish the next fix-packet.
be patient for some hours please.

Logged

Anleitungen lesen und selber nachdenken ist anstrengend...  Da lass ich doch lieber andere für mich denken...

In 1984:  Nineteen Eighty-Four is a unrealistic utopia!!
In 2012:  Nineteen Eighty-Four is a little piece only of our reality!!
Argos
Moderator
**
Offline Offline

Posts: 2161


WWW
« Reply #6 on: September 01, 2011, 12:40:18 PM »

Great, thanks!
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Vincent

Offline Offline

Posts: 360


WWW
« Reply #7 on: September 01, 2011, 06:38:51 PM »

Looks like the fix-packet didn't solve this problem.... undecided
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!