Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • bgies Friend
    #159100

    I cannot save ja_slideshow in Joomla 1.6 using a ja_portfolio template. I get a “No_Permission” error every time I try to save it.

    The problem happens on my production server and development server.

    Production server is LAMP
    Developer server is WAMP

    I’m admin on both machines and because the dev server is WAMP there should be no permission issues on it at all. I’m also a Joomla extension developer so I’ve started looking through the source code.. but haven’t found the problem yet.

    Update: I should have mentioned that I am also logged into Joomla as the Super User for both machines. Also, I changed the message on line 70 of helper.php and now I get the changed message… so the error is coming from this block of code:

    $user = JFactory::getUser();
    $allowGroups = array(‘Super Users’, ‘Administrator’, ‘Manager’);
    $finded = false;
    foreach($user->groups as $group)
    {
    if(in_array($group,$allowGroups)){
    $finded = true;
    break;
    }
    }
    if(!$finded)
    {
    $result[‘error’] = JText::_(‘NO_PERMISSION’);
    echo json_encode($result);
    exit;
    }

    Sorry… I can’t properly debug right now… I was running Joomla System tests and changed my debugging settings for selenium and haven’t changed them back yet.

    Also… I noticed you are using the $mainframe variable above this code… and I believe it is deprecated. Has ja_slideshow been updated for J 1.6?

    ush_gan Friend
    #373105

    Hi bgies,

    Same issue. I checked both the versions of JA_Slideshow (1.0.0 and 1.0.1). Let me know if you find the root cause.

    – Ganesh

    bgies Friend
    #373107

    You can change the line
    $allowGroups = array(‘Super Users’, ‘Administrator’, ‘Manager’);
    to
    $allowGroups = array(8, 7, 6);

    That will get it past the permissions error…. but still nothing shows on the Front End… It obviously has not been updated for J 1.6… and now I’m wondering if any of the other extensions that go with this template have either.

    The template itself seems to be ok… but without the extensions I can’t do too much, so it’s hard to know for sure.

    ush_gan Friend
    #373135

    Thanks. Will try and revert.

    Ninja Lead Moderator
    #373139

    Hi all,

    To fix this problem, please do as following:

    – open “helper.php” file on location “modules/mod_jaslideshow/admin/”.

    – Find line

    jimport('joomla.filesystem.folder');
    jimport('joomla.filesystem.file');

    $user = JFactory::getUser();

    ....

    /**
    * modJAAnimation class.
    *
    */


    Change to

    jimport('joomla.filesystem.folder');
    jimport('joomla.filesystem.file');

    $user = JFactory::getUser();
    $allowGroups = array('Super Users', 'Administrator', 'Manager');
    $finded = false;

    foreach($user->groups as $group=>$group_id)
    {
    if(in_array($group,$allowGroups) || in_array($group_id, $allowGroups)){
    $finded = true;
    break;
    }
    }
    /**
    * modJAAnimation class.
    *
    */


    we will include this fix in the next release.

    klaasvaak12 Friend
    #375849

    @ hungnd
    When i add your solution i,m getting the following error

    Operation Failed: Failed to open file for writing.

    ag0g0girl Friend
    #377503

    I think I have a newer version. I’m on 1.6 and was getting the same error.

    I took out
    if(!$finded)
    {
    $result[‘error’] = JText::_(‘NO_PERMISSION’);
    echo json_encode($result);
    exit;
    }

    and now the module saves with default images folder, the fruitshop in the slideshow module position. I go to look at homepage but it doesn’t show up. I have module assigned to page, and published. I cleared browser cache and ja system cache.

    What should I check next? I’ve been using these really cool templates but this is m first time trying to use the slideshow module.

    thuanlq Friend
    #377885

    Hi all,

    To fix “NO_PERMISSION” error for jaslideshow module, please update this line code in the file “helper.php” in the folder “modules/mod_jaslideshow/admin/”:


    $user = JFactory::getUser();
    $allowGroups = array('Super Users', 'Administrator', 'Manager');
    $finded = false;

    foreach($user->groups as $group=>$group_id)
    {
    if(in_array($group,$allowGroups) || in_array($group_id, $allowGroups)){
    $finded = true;
    break;
    }
    }
    ...
    if(!$finded)
    {
    $result['error'] = JText::_('NO_PERMISSION');
    echo json_encode($result);
    exit;
    }

    Or replace “helper.php” file with my attach file 11385
    – The slideshow module don’t show up at homepage. Please check menu assignments and assign it to the Home menu.

    Thanks,


    1. ja_slideshow.Zip
Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 8 replies, has 6 voices, and was last updated by  thuanlq 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum