[opencms-dev] external links in OpenCmsVfsFile
Michael Moossen
m.moossen at alkacon.com
Mon Apr 5 15:02:51 CEST 2010
Hi, Paul!
it looks like your configuration files are broken...
check your opencms-vfs.xml, almost at the end there should be an entry
for the OpenCmsVarFile type...
HTH
--
Michael
-------------------
Michael Moossen
Alkacon Software GmbH - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org
Paul-Inge Flakstad wrote:
> Hi Michael,
>
> I was actually aware of the OpenCmsVarFile option, but I left it out on purpose because I've never succeeded in using this type. It always produces an error, looks like the type isn't recognized (copy-pasted here from my 7.5.1 install):
>
> org.opencms.xml.CmsXmlException: Invalid OpenCms content definition XML schema structure: Schema type "OpenCmsVarFile" unknown.
>
> I hope I didn't ruin the last day of easter holiday for you now..! :-)
>
> Best regards
> Paul
>
>> -----Original Message-----
>> From: opencms-dev-bounces at opencms.org
>> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Michael Moossen
>> Sent: 5. april 2010 14:45
>> To: The OpenCms mailing list
>> Subject: Re: [opencms-dev] external links in OpenCmsVfsFile
>>
>> Hi Gleb, Paul!
>>
>> you can also use the OpenCmsVarFile type, that accepts VFS
>> and external
>> links at the same time.
>>
>> HTH
>> --
>> Michael
>>
>> -------------------
>> Michael Moossen
>>
>> Alkacon Software GmbH - The OpenCms Experts
>> http://www.alkacon.com - http://www.opencms.org
>>
>>
>>
>> Paul-Inge Flakstad wrote:
>>> Hi Gleb
>>>
>>> OpenCmsVfsFile accepts only relative paths to files that exist on
>>> your OpenCms system, and you cannot disable the existence
>> check, as far
>>> as I know. You can however use an OpenCmsVfsFile field to
>> refer to an
>>> external file by pointing to a VFS file of type "pointer" (called
>>> "External link" in the "New" dialog). A file of type
>> "pointer" is simply
>>> a file that holds a reference to any URL, and if you access
>> the pointer,
>>> you will be redirected to that URL. I would suggest using
>> this approach
>>> if you're mostly pointing to local files, and rarely external files.
>>>
>>> If you're often pointing to external files, then you
>> probably want to
>>> convert the OpenCmsVfsFile field to an OpenCmsString field.
>> For getting
>>> this job done while preserving your data, my best
>> suggestion would be to
>>> write a custom JSP that modifies your xmlcontent files.
>> (You will of
>>> course have to change your XSD file(s) as well, but that
>> part should be
>>> quite straight-forward.)
>>>
>>> Note: the administration panel has a tool under "Content
>> tools" called
>>> "Repair XML content", which will repair xmlcontent files
>> according to
>>> their XSD file(s). Unfortunately it cannot be used in your
>> case, as all
>>> your data for that field would be lost. (You could have
>> used it if you
>>> were converting the opposite way though, changing an
>> OpenCmsString field
>>> into an OpenCmsVfsFile field.)
>>>
>>> Best regards,
>>> Paul
>>>
>>>
>> --------------------------------------------------------------
>> ----------
>>> *From:* opencms-dev-bounces at opencms.org
>>> [mailto:opencms-dev-bounces at opencms.org] *On Behalf Of
>> *gleb makarov
>>> *Sent:* 5. april 2010 12:46
>>> *To:* opencms-dev at opencms.org
>>> *Subject:* [opencms-dev] external links in OpenCmsVfsFile
>>>
>>> Hello everyone,
>>>
>>> I have a problem with external links in xmlcontent. There is an
>>> OpenCmsVfsFile field type in xmlcontent files. It`s
>> description in
>>> the xml scheme is <xsd:element name="Image"
>> type="OpenCmsVfsFile" />
>>> When I try to enter there a file name (path to file) form the
>>> different domain name (http://servername/..), system
>> shows an error
>>> 'Invalid reference, the resource can not be found'.
>>>
>>> I`d like to know if there is a way to update this
>> scheme and change
>>> the field type without data loss (for example change
>> VfsFile to String).
>>> Or is it possible to disable verification of the OpenCmsVfsFile
>>> field type when saving xmlcontent file?
>>>
>>> I can`t update all xml schemes and templates manually because of
>>> their huge amount.
>>>
>>> Thank you in advance.
>>>
>>> --
>>> Best regards,
>>> Gleb Makarov
>>>
>>>
>>>
>> --------------------------------------------------------------
>> ----------
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the
>> list, please visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list,
>> please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list