Invalid argument on default install

bugmenot
13 years, 8 months ago
Hey there,

just tried out your seemingly fantastic extension for Joomla 1.5.23, and it seems to work fine except for some PHP errors I get in the mobile versions of the site (does not depend on a specific device). It says:

Warning: Invalid argument supplied for foreach() in /www/htdocs/w00e4cd5/modules/mod_mj_menu/helper.php on line 36


while on some of the pages Joomla seems to have problems directing to the right content (or resizing?) and puts out errors like

: file_put_contents(/www/htdocs/w00e4cd5/images/stories/CampingplatzProspekt/Resized/index.html) []: failed to open stream: No such file or directory in on line 


- I use JoomSEF, could that be the problem here so that Mobile Joomla gets irritated in a way? Just trying narrow it down and see that it might or might not be mobile joomla (since I didn't have those errors beforehand).

Thanks in advance

bugger
dryabov
13 years, 8 months ago
Which MobileJoomla version do you use? In the latest one there is no foreach on line 36.

Second issue looks like permission issue, but the reason is unknown (MJ uses core Joomla method JFile::write to put empty index.html to new directories)
bugmenot
13 years, 8 months ago
Hey there,

thanks for the kind reply; I am using 1.0 RC2 from this site, so it should be up to date... line 36 does have a foreach here (beginning here in line 29 for better reference):
		/** @var JMenuSite $menu */
$menu =& JSite::getMenu();
if($is_joomla15)
{
$attribute = array_shift($attributes);
$value = array_shift($values);
$items = $menu->getItems($attribute, $value);
foreach($items as $key=>$item)


As for the second issue, I cannot retrieve it now on the site, but it may have been that the folders here (CampingPlatzProspekt) has not been chmodded to 777 after I moved to the new server, so it might be fixed now thanks to your hint. Your script should however be able to create a new directory plus the files if the parent directory is 777, right?

Thanks for your help so far .
bugmenot
13 years, 8 months ago
Well, when trying to replace the helper.php with the new one via FTP I get a 550 error, I assume it is because the script created the files. Do you happen to have any workaround for this? CHMOD is 644 and I cannot change it due to the permission thingy...


Thanks again
dryabov
13 years, 8 months ago
Try to remove helper.php by ftp, upload new version, and set its permission to 664.
bugmenot
13 years, 8 months ago
'tis what I did and what produced that 550 error .

Edit: Seems to be your extension. I used a file manager for Joomla to chmod the folders/files from your module, so I finally got hold of it. After reinstalling it, it is the server who is the owner again. Still got it working, finally.
bgreene75013
13 years, 8 months ago
worked for me, too!
bugmenot
13 years, 8 months ago
Still a bit of a hassle to chmod all folders created by the component to 777 via filemanager. Having the same problem with the template files involved...

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.