Elxis CMS Forum

Community => Elxis 2008.x Olympus (dev) => Topic started by: silas on January 10, 2008, 15:26:39

Title: Harmful Error found?
Post by: silas on January 10, 2008, 15:26:39
Hi there,

the following BIG Error appears with Elxis 2008. I'v tested it on three different server because I Could'nt belief it.....

If you (global configuration-server) set to chmod new files and directorys to yes and check the box "apply to existing files" the whole systems crashes after clicking Apply-Button. The file and directory rights are completely destroyed! (try to set 644 fo files and 755 to directorys)

The same error occures when i try to upload an avatar using "Edit profile". File will be uploaded but never will be readable, cause the rights are completely wrong set.

I altered com_user.php and commetn out the lines with chmod 0666 and upload avatars worked fine with correct rights set.

Same in Tools - Chmod: Using this function crashes all.

In all cases the rights will be set to: 101232 which is truely completely wrong.

Tested on: Fedora Core 6 (64), Ubuntu 7.10 (64) Ubuntu 7.06 (32)

What's that?


 
Title: Re: Harmful Error found?
Post by: Ivan Trebješanin on January 10, 2008, 15:39:49
Hi silas, are you using DEV of full 2008 version?

EDIT: sorry, I didn't see the whole topic title... :P Well, I have noticed that, but on local PC(win) you CAN install everything and it will be OK for developers. It just happens on *NIX systems. But even there, you can simply upload files trough cPanel, and everything will be OK. This version is just for developers, anyway.
Title: Re: Harmful Error found?
Post by: CREATIVE Options on January 10, 2008, 16:43:01
This version is just for developers, anyway.

And also:
1. it isn't for Online / Production websites.
2. it isn't the public release version !
Title: Re: Harmful Error found?
Post by: silas on January 10, 2008, 17:20:59
This version is just for developers, anyway.

And also:
1. it isn't for Online / Production websites.
2. it isn't the public release version !

I am using the full Version for the german Elxis Portal. The DEV with patch to full Version. I KNOW all what you said, but I got the Version especially to build the Portal with this version. So I have spend my morning to find out *why* some errors occure. If this behaviour is well known by the developers - OK. I didn't know this and only want to tell them.
Title: Re: Harmful Error found?
Post by: Ivan Trebješanin on January 10, 2008, 17:47:46
Thank you silas.
I have discovered this behaviour just this morning, and solved it via cPanel. Before today, I was developing template, so I didn't notice this. But, when I installed the component that was working perfectly on my PC and failed to work on remote server, I noticed this problem. It is a problem, and  I'm sure datahell will solve it in public release. Also, I didn't notice this problem on elxis-demo site, so it must be just a problem with DEV version.
As I said: Thank you for shearing this problem. :)
Title: Re: Harmful Error found?
Post by: silas on January 10, 2008, 17:54:35
Thank you silas.
I have discovered this behaviour just this morning, and solved it via cPanel........

Thats fine!

I temporarly solved this behavior:Disabeling chmod in powerboard-code and com_user-code. Works fine at the moment  :)
Title: Re: Harmful Error found?
Post by: datahell on January 10, 2008, 18:29:44
There was a related 2006.x bug with the filemanager class which gave wrong permissions. We have solved this problem on core level on the 2008.0 version. May be there are still some areas that needs to be fixed for chmod. The chmod tool for me works fine although I will check it again. I have never used chmod via the global config because in every site I set the files/folders permissions manually. Setting the proper permissions is 5 seconds work. See here: https://forum.elxis.org/index.php?topic=1544.0

I will check it again this feature.

Just for your information.
The proper use of the filemanager's function spChmod is (specific chmod):

$fmanager->spChmod('full absolute path to file', '4 digit octadecimal mode');

Example:
$fmanager->spChmod('/home/user/public_html/index.php', '0644');
Title: Re: Harmful Error found?
Post by: silas on January 10, 2008, 19:09:59
There was a related 2006.x bug with the filemanager class which gave wrong permissions. We have solved this problem on core level on the 2008.0 version. May be there are still some areas that needs to be fixed for chmod. The chmod tool for me works fine although I will check it again. I have never used chmod via the global config because in every site I set the files/folders permissions manually. Setting the proper permissions in 5 seconds work. See here: https://forum.elxis.org/index.php?topic=1544.0
....


I also do this normaly "by hand". I have found the errror, because my users want to upload avatars and this would not work. So I tried to find out why. During the tests, I use the chmod in global config to see what happend if I do so. Result above  :)

But it's all clear now. I only want to be sure that you know about this error. As I said earlier, I could solve the problem for me. I have some other issues to work at. Hint: Try to make a menuentry with Blog-Content-Categorie and than switch on SEO PRO.....
But I think you know this too and in Public Version it will be solved.  :)

Bye
 Silas
Title: Re: Harmful Error found?
Post by: datahell on January 10, 2008, 20:02:53
Sorry, what problem you have with SEO PRO and "blog content category" menus?
Title: Re: Harmful Error found?
Post by: silas on January 10, 2008, 20:09:51
Sorry, what problem you have with SEO PRO and "blog content category" menus?

Content will not be displayed when I switch on SEO PRO. See Screenshot. That only happens with  this Blog-Content-Categorie Link.

[old attachment deleted by admin]
Title: Re: Harmful Error found?
Post by: datahell on January 10, 2008, 20:49:50
You are right!

Here is the solution:

open /includes/seopro/com_content.php

Go to around line 587

Replace this:

               if ($_Itemid) {
                   $_GET['Itemid'] = $_Itemid;
                   $_REQUEST['Itemid'] = $_Itemid;
                   $QUERY_STRING[] = 'Itemid='.$_Itemid;
                   $ok = 1;
               }

with this:

               if ($_Itemid) {
                   $_GET['Itemid'] = $_Itemid;
                   $_REQUEST['Itemid'] = $_Itemid;
                   $QUERY_STRING[] = 'Itemid='.$_Itemid;
                   $ok = 1;
               }

            if (!$ok) {
                  $query = "SELECT id FROM #__menu"
               ."\n WHERE link='index.php?option=com_content&task=".$task."&id=".intval($row['id'])."'"
               ."\n AND published='1' AND ((language IS NULL) OR (language LIKE '%$lang%'))";
                  $database->setQuery($query, '#__', 1, 0);
                  $_Itemid = intval($database->loadResult());
                  if ($_Itemid) {
                      $_GET['Itemid'] = $_Itemid;
                      $_REQUEST['Itemid'] = $_Itemid;
                      $QUERY_STRING[] = 'Itemid='.$_Itemid;
                      $ok = 1;
                   }
               }


Thank you very much silas for the bug report!
Title: Re: Harmful Error found?
Post by: silas on January 10, 2008, 22:11:24

Thank you datahell!

Works fine!