[opencms-dev] external links in OpenCmsVfsFile
Paul-Inge Flakstad
flakstad at npolar.no
Mon Apr 5 15:37:09 CEST 2010
Hi Michael, Gleb
Checked my startup log and found the "error": the type name is OpenCmsVarLink. Note the use of "Link" not "File" at the end.
Typos are the worst errors sometimes, they can be so incredibly invisible! :-)
So Gleb, just change from "OpenCmsVfsFile" to "OpenCmsVarLink" in your XSD file(s), then run the admin tool I mentioned, and you should be fine. ;-)
Cheers,
Paul
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of
> Paul-Inge Flakstad
> Sent: 5. april 2010 15:26
> To: The OpenCms mailing list
> Subject: Re: [opencms-dev] external links in OpenCmsVfsFile
>
> Hi again Michael,
>
> I don't think my file is broken. I checked it against the
> unmodified 7.5.0 release file. This section is identical for
> my upgraded/modified 7.5.1 version and the unmodified 7.5.0 release:
>
> <schematypes>
> ...
> <schematype
> class="org.opencms.xml.types.CmsXmlVarLinkValue"
> defaultwidget="org.opencms.widgets.CmsVfsFileWidget" />
> ...
> </schematypes>
>
> which I guess is the OpenCmsVarFile type. I can't seem to
> find the exact phrases that are used in the XSD files (like
> "OpenCmsVarFile" or "OpenCmsVfsFile") anywhere in
> opencms-vfs.xml but I guess this is the entry you are referring to?
>
> Any other ideas? Are you able to test on a clean 7.5.x
> system, to see if you get the same error I do..?
>
> 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 15:03
> > To: The OpenCms mailing list
> > Subject: Re: [opencms-dev] external links in OpenCmsVfsFile
> >
> > 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
> >
> > _______________________________________________
> > 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