Monday 11 January 2010 3:12:33 pm
Hi Russel and Jérôme! Sorry for the delay with my response about this issue. It appears to be a never ending quest to make Webdav work on eZ 4.1.1. I have been occupied with continuous reserach for error after error appearing... As I mentioned above, I couldnt see anything below the virtual Media node. This took a while to sort out, but I have now solved the problem. It turned out to be a mismatch in constants names. Let me be more specific. Have a look at the file kernel/private/classes/webdav/ezwebdavcontentbackend.php Right after the class definition we have code setting constants like this:
/** * The name of the content folder in eZ Publish. */
const VIRTUAL_CONTENT_FOLDER_NAME = 'Content';
/** * The name of the media folder in eZ Publish. */
const VIRTUAL_MEDIA_FOLDER_NAME = 'Media'; From this one could assume that these constants would be used when referencing the virtual folders in webdav. And my experience until now is that the constants are also used to fetch nodes from the Db (correct me if I am wrong...) If so, since we are in eZ 4, the media folder should be referenced 'media', not 'Media'. I changed this, but nothing happened. After a long adventure into the ezc/Webdav I found my way back to row 3182 in kernel/private/classes/webdav/ezwebdavcontentbackend.php
/** * The name of the media folder in eZ Publish, translated.
*
* @return string
*/
public static function virtualMediaFolderName() {
return ezi18n( 'kernel/content', 'Media' ); }
/** * The name of the media folder in eZ Publish, translated.
*
* @return string
*/ Please note that the Media folder name is hardcoded here. I wonder why the constant mentioned above wasnt used.... Also, here as well, Media, when is should have been media... Another thing, I dont understand how the ezi18n can be right to use here. See my problem with the content node above in this thread. Maybe I just dont understand, but how can it be correct to translate the node and then later on try to fetch from the db the translated value? It surely is not translated there... After my corrections, I got the Media part working but there were more problems to come. Let me get back with more info, but the function internalNodePath in the same file is a little worrying.To begin with, also here the Media folder is hardcoded as a string. However here with the correct format. But I am more troubled with the way the method returns paths, primarily in the media part.In our system we use pathprefixes, set up in Site.ini. The code cant possibly be written with pathprefixes in mind. At least I couldnt publish anything with webdav to the media folder without tweaking this function. I will get back with more info when I am sure of what I am doing... :-) Also - please note that if you are using pathprefixes, you MUST use
PathPrefixExclude[]=media In your override/site.ini. Otherwise it wont work. The need for the PathPrefixExclude should really be mentioned in the documentation. I havent seen a trace of it anywhere... So - is that it? Not by far, I am afraid. Now I am struggling with problems moving and copying nodes in webdav. Both these actions do work - the node gets copied or gets moved. However, in the same process the webserver returns a HTTP 500 status, like this: (Moving an image, apache access log)
192.168.11.83 - user [11/Jan/2010:23:51:29 +0100] "MOVE /customer/media/bilder/bild_3.png HTTP/1.1" 500 69 "-" "Microsoft Data Access Internet Publishing Provider DAV 1.1" So the move action, consisting of a copy action followed by a delete action works perfectly. But what is it that is sending the 500 "Internal Server Error" repsonse code? I dont have a clue and it is driving me crazy... All ideas that might lead in whatever useful direction are welcome... And as you all can see, the webdav functionality in eZ is far from ready for your customer project. To be continued... Best regards /Nicklas
Nicklas Lundgren, Managing Director
Novitell AB, Sweden
|