Forums / Developer / [WEBDAV] content folder cannot be browsed. Can it be solved?

[WEBDAV] content folder cannot be browsed. Can it be solved?

Author Message

luca maroni

Thursday 03 July 2008 2:20:27 am

Hi eZPublish community,

I know there is a lot of Topics about this but really I couldn’t find any solutions and at the end I didn’t understand if there is a solution.

I saw there is also an issues open on the issues tracker about that (issue 013189 posted 21 days ago) but not yet assigned or commented.

My problem is:
Enabling WEBDAV on an eZPublish website I can access and browse correctly the Media folder but not the Content folder. When I try to open the Content folder I can see the items inside it but if I try to access one of them I receive an error like “The folder is not more available”

I’m using Internet Explorer 7 to open the WEBDAV directories, but I tried also another WEBDAV client but without any good results.

DEVELOPMENT SERVER configuration:
Windows XP
Apache 2.2.8
MySQL 5.0.51a
PHP 5.2.5
eZPublish 4.0

The database character set is utf8

I tried also to upgrade WEBDAV module with the 4.0.1 rc1 but without any results

Someone can show me the right way  :)

Thanks a lot
Luca

Ivo Lukac

Thursday 03 July 2008 2:29:43 am

Hi luca

Just a guess but maybe will help: check webdav.ini if every class that is used like a folder in the Content part is in FolderClasses[] list.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

luca maroni

Thursday 03 July 2008 5:23:47 am

Hi Ivo,

Yes I set up the webdav.ini to manage all the classes I need as folder:

...
FolderClasses[]
FolderClasses[]=folder
FolderClasses[]=repository
FolderClasses[]=workshop
FolderClasses[]=meeting
FolderClasses[]=conference
 ...

Looking through the webdav.log I saw something interesting. When I browse the media directories (using webdav) we have the correct requests

Looking media directory everything is ok and we have in the log file

2008-07-03 14:14:00 : ========================================
2008-07-03 14:14:00 : Requested URI is: /mars/Media [webdav.php]
2008-07-03 14:14:00 : start path: /mars/Media [CS:currentSiteFromPath]
2008-07-03 14:14:00 : indexdir: /mars/Media [CS:currentSiteFromPath]
2008-07-03 14:14:00 : site mars: /mars/Media [CS:currentSiteFromPath] 

Looking media/banner directory everything is ok and we have in the log file

2008-07-03 14:14:02 : ========================================
2008-07-03 14:14:02 : Requested URI is: /mars/Media/Banner [webdav.php]
2008-07-03 14:14:02 : start path: /mars/Media/Banner [CS:currentSiteFromPath]
2008-07-03 14:14:02 : indexdir: /mars/Media/Banner [CS:currentSiteFromPath]
2008-07-03 14:14:02 : site mars: /mars/Media/Banner [CS:currentSiteFromPath]

Looking through the content directory we have something wrong

Looking content directory everything is ok and we have in the log file

2008-07-03 14:16:53 : Requested URI is: /mars/Content [webdav.php]
2008-07-03 14:16:53 : start path: /mars/Content [CS:currentSiteFromPath]
2008-07-03 14:16:53 : indexdir: /mars/Content [CS:currentSiteFromPath]
2008-07-03 14:16:53 : site mars: /mars/Content [CS:currentSiteFromPath]

When I try to access the directory content /about-us the requested URI is wrong, it should be /mars/content/About-us instead of /mars/About-us

2008-07-03 14:16:59 : ========================================
2008-07-03 14:16:59 : Requested URI is: /mars/About-us [webdav.php]
2008-07-03 14:16:59 : start path: /mars/About-us [CS:currentSiteFromPath]
2008-07-03 14:16:59 : indexdir: /mars/About-us [CS:currentSiteFromPath]
2008-07-03 14:16:59 : site mars: /mars/About-us [CS:currentSiteFromPath]

it is strange, isn't it? %-)

Thanks,
Luca

Ivo Lukac

Friday 04 July 2008 4:14:45 am

Could be a problem related to nondefault RootNode or PathPrefix settings or some bug. Try to search issues.ez.no if someone had similar problems...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

luca maroni

Friday 04 July 2008 6:10:27 am

Hi Ivo,

Thanks a lot for your help :)

Unfortunatly both of the parameters you suggested to check are with the default value:
RootNode=2

and PathPrefix is empty
PathPrefix=

I tried to install a fresh eZPublish 4.0 website without any changes and I tried to enable the webdav on this new website, the result is the same! Media Folder is accessible without any problem. Content folder can be browsed only at the first level. :-(

Any other idea?

Luca

luca maroni

Friday 04 July 2008 7:02:40 am

Looking more in depth into the log files I saw that the system fails the getVirtualFolderCollection() function in the eZWebDAVContentServer class because the variable $collection has a wrong value:

For example looking in the folder Media/Banner the $collection value is "Media/Banner", the system works well and in the log file we have:

Check virtual folder: site 'mars' in 'Media/Banner'  [CS:getVirtualFolderCollection]
2008-07-04 15:38:39 : Can access 'mars' and 'Media' [CS:userHasVirtualAccess]

But when I try to look into a folder into Content section, for example looking in the folder Content/About-us, the $collection value is "About-us", the system doesn't work and in the log file we have:

2008-07-04 15:37:53 : Check virtual folder: site 'mars' in 'About-us'  [CS:getVirtualFolderCollection]
2008-07-04 15:37:53 : Unknown virtual folder: 'About-us' in site 'mars' [CS:getVirtualFolderCollection]

I tried to force the $collection variable with "Content/About-us" and the system works like a charm ;-). But why I have the $collection value wrong when I browse the Folder "Content"??

I cannot understand it :-( ... This issue drives me crazy %-)
Luca

Ivo Lukac

Friday 04 July 2008 11:56:46 am

If it doesn't work from the default instalation than it is a bug,

Found 2 issues related to this:
http://issues.ez.no/IssueView.php?Id=13189&activeItem=37
http://issues.ez.no/IssueView.php?Id=12526&activeItem=39

Try the suggestions from the last one.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

luca maroni

Monday 07 July 2008 12:41:27 am

I tried the suggestions reported into the topics but nothing ...

BTW I think I found the problem. In the eZWebDAVContentServer class there is a code at line 1531 to manage the path with the "Content" folder:

            // only when the virtual folder is Content we need to add its path to the start URL
            // the paths of other top level folders (like Media) are included in URL aliases of their descending nodes
            if ( $virtualFolder == VIRTUAL_CONTENT_FOLDER_NAME )
            {
                $startURL = '/' . $siteAccess . '/' . $virtualFolder . '/';
            }
            else
            {
                $startURL = '/' . $siteAccess . '/';
            }

the problem is that the constant VIRTUAL_CONTENT_FOLDER_NAME is never defined and the if is never true. I added the define at the beginning of the ezwebdavcontentserver.php file:

define( "VIRTUAL_CONTENT_FOLDER_NAME", ezi18n( 'kernel/content', "Content" ) );

with this patch it seems to work well. But my question now is: is it possible that for someone the webdav is working without the VIRTUAL_CONTENT_FOLDER_NAME constant defined?

Luca

Ivo Lukac

Monday 07 July 2008 3:15:34 am

Report the bug, could be related to ver4.0

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac