LeeFoster Posted April 2, 2019 Share Posted April 2, 2019 I have this installed and am getting the below error. Quote Warning: Invalid argument supplied for foreach() in admin\administrator_groups.php on line 156 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 @codoffer Any thoughts on this? It appears to not be bringing the list of boxes through using - $cl_box_groups Quote Link to comment Share on other sites More sharing options...
codoffer Posted April 3, 2019 Share Posted April 3, 2019 I am not maintaing this plugin with latest version of osc. I will have to check the code again. Can you put your osc version and photo version here? Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 3, 2019 Share Posted April 3, 2019 @LeeFoster By chance, are you running PHP v7.x ? M Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 3 hours ago, ArtcoInc said: @LeeFoster By chance, are you running PHP v7.x ? M Yeah, 7.2.5 Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 3 hours ago, codoffer said: I am not maintaing this plugin with latest version of osc. I will have to check the code again. Can you put your osc version and photo version here? osc version is burts bs4 and php is 7.2.5 Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 3, 2019 Share Posted April 3, 2019 @LeeFoster That is a PHP Warning, not an Error. As I've said before, newer versions of PHP are becoming more strict. You could just ignore the warning, but it would be better to update the code to the current PHP structure. Do a search here in the forum for foreach(). It's been discussed before. M Quote Link to comment Share on other sites More sharing options...
Omar_one Posted April 3, 2019 Share Posted April 3, 2019 (edited) @LeeFoster I have Easy admin group osc 2.3 working under php7.2 without any error Edited April 3, 2019 by Omar_one Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 24 minutes ago, ArtcoInc said: @LeeFoster That is a PHP Warning, not an Error. As I've said before, newer versions of PHP are becoming more strict. You could just ignore the warning, but it would be better to update the code to the current PHP structure. Do a search here in the forum for foreach(). It's been discussed before. M No it's an error because it's also not showing the list of boxes that it should. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 5 minutes ago, Omar_one said: @LeeFoster I have Easy admin group osc 2.3 and I have php7.2 without any error Can you send me a screen shot of your admin groups page when you are editing or adding a new group? Quote Link to comment Share on other sites More sharing options...
Omar_one Posted April 3, 2019 Share Posted April 3, 2019 (edited) @LeeFoster screenshot sent Edited April 3, 2019 by Omar_one Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 1 minute ago, Omar_one said: @LeeFoster screenshot sent Yeah I'm not getting the list of boxes down the right. Quote Link to comment Share on other sites More sharing options...
ArtcoInc Posted April 3, 2019 Share Posted April 3, 2019 Quote Link to comment Share on other sites More sharing options...
Omar_one Posted April 3, 2019 Share Posted April 3, 2019 @LeeFoster can you try to change this line foreach ($cl_box_groups as $groups) { to foreach ((array)$cl_box_groups as $groups) { Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 9 minutes ago, Omar_one said: @LeeFoster can you try to change this line foreach ($cl_box_groups as $groups) { to foreach ((array)$cl_box_groups as $groups) { This got rid of the warning but I am still not seeing the list of boxes. Quote Link to comment Share on other sites More sharing options...
Omar_one Posted April 3, 2019 Share Posted April 3, 2019 22 minutes ago, LeeFoster said: Yeah I'm not getting the list of boxes down the right. did you replaced (admin/includes/column_left.php) <?php foreach ($cl_box_groups as $groups) { echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } ?> with this one <?php foreach ($cl_box_groups as $groups) { if(display_block_to_admin_group($groups['heading'])){ echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { if(check_admin_group($app['code']))echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } } ?> Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
LeeFoster Posted April 3, 2019 Share Posted April 3, 2019 2 minutes ago, Omar_one said: did you replaced (admin/includes/column_left.php) <?php foreach ($cl_box_groups as $groups) { echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } ?> with this one <?php foreach ($cl_box_groups as $groups) { if(display_block_to_admin_group($groups['heading'])){ echo '<h3><a href="#">' . $groups['heading'] . '</a></h3>' . '<div><ul>'; foreach ($groups['apps'] as $app) { if(check_admin_group($app['code']))echo '<li><a href="' . $app['link'] . '">' . $app['title'] . '</a></li>'; } echo '</ul></div>'; } } ?> Yeah I did. If I add this from the top of the column_left.php file into the administrators_group.php file I get the list on the right but the left column doesn't show. if (tep_session_is_registered('admin')) { $cl_box_groups = array(); if ($dir = @dir(DIR_FS_ADMIN . 'includes/boxes')) { $files = array(); while ($file = $dir->read()) { if (!is_dir($dir->path . '/' . $file)) { if (substr($file, strrpos($file, '.')) == '.php') { $files[] = $file; } } } $dir->close(); natcasesort($files); foreach ( $files as $file ) { if ( file_exists(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file) ) { include(DIR_FS_ADMIN . 'includes/languages/' . $language . '/modules/boxes/' . $file); } include($dir->path . '/' . $file); } } function tep_sort_admin_boxes($a, $b) { return strcasecmp($a['heading'], $b['heading']); } usort($cl_box_groups, 'tep_sort_admin_boxes'); function tep_sort_admin_boxes_links($a, $b) { return strcasecmp($a['title'], $b['title']); } foreach ( $cl_box_groups as &$group ) { usort($group['apps'], 'tep_sort_admin_boxes_links'); } Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted April 4, 2019 Share Posted April 4, 2019 I suspect this is an issue with the bs4 admin I am using, not anything else as I did a fresh install without it and it works. Quote Link to comment Share on other sites More sharing options...
moldbody Posted June 11, 2019 Share Posted June 11, 2019 (edited) @LeeFoster I got exactly the same problem like yours, my version is os v2.3.4.1. Even i reinstall it, the same problem happen (left column disappear) when i replace the codes in column_left.php Edited June 11, 2019 by moldbody Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted June 11, 2019 Share Posted June 11, 2019 1 hour ago, moldbody said: @LeeFoster I got exactly the same problem like yours, my version is os v2.3.4.1. Even i reinstall it, the same problem happen (left column disappear) when i replace the codes in column_left.php I managed to fix it but can't remember how right now. Quote Link to comment Share on other sites More sharing options...
Fredi Posted February 7, 2020 Share Posted February 7, 2020 Has anyone tried this add-on for Phoenix? I changed this for Phoenix, but the problem with the display of boxing remained. Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
LeeFoster Posted February 7, 2020 Share Posted February 7, 2020 6 minutes ago, Fredi said: Has anyone tried this add-on for Phoenix? I changed this for Phoenix, but the problem with the display of boxing remained. Do you mean the error I was having? Quote Link to comment Share on other sites More sharing options...
Fredi Posted February 7, 2020 Share Posted February 7, 2020 There is no boxing for choosing admin groups the right Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
LeeFoster Posted February 7, 2020 Share Posted February 7, 2020 Just now, Fredi said: There is no boxing for choosing admin groups the right Can you send a screen shot? And if you send me the updated file I'll have a look. Quote Link to comment Share on other sites More sharing options...
Fredi Posted February 7, 2020 Share Posted February 7, 2020 Sorry, Screen in Russian ... I have not made language files in English yet. Quote Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.Best regards, Fredi Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.