[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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:22:59
Script start
Timing: Jan 18 2025 11:22:59
Module start 'layout'
Timing: Jan 18 2025 11:22:59
Module start 'content'
Timing: Jan 18 2025 11:22:59
Module end 'content'
Timing: Jan 18 2025 11:22:59
Script end

Main resources:

Total runtime0.7323 sec
Peak memory usage4,096.0000 KB
Database Queries75

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.3047152.6563
Module start 'layout' 0.00560.0028 741.960939.5078
Module start 'content' 0.00840.7222 781.4688643.4688
Module end 'content' 0.73060.0017 1,424.937524.0938
Script end 0.7322  1,449.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4349160.0002
Check MTime0.00130.1708160.0001
Mysql Total
Database connection0.00090.122910.0009
Mysqli_queries0.647788.4529750.0086
Looping result0.00070.0889730.0000
Template Total0.703996.120.3520
Template load0.00160.213820.0008
Template processing0.702395.907420.3512
Template load and register function0.00010.019710.0001
states
state_id_array0.00080.103410.0008
state_identifier_array0.00180.242020.0009
Override
Cache load0.00150.2094860.0000
Sytem overhead
Fetch class attribute can translate value0.00060.085820.0003
Fetch class attribute name0.00110.1540100.0001
XML
Image XML parsing0.00100.133720.0005
class_abstraction
Instantiating content class attribute0.00000.0042130.0000
General
dbfile0.00110.1528170.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
29content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
13content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
9content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 66
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs