CND updater module renames configuration nodes

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

CND updater module renames configuration nodes

Roberto van der Linden
Hello,

I have an updater module to update my CND. When this updater is finished, it apparently renamed some nodes at the following paths:

/hippo:configuration/hippo:frontend/cms/cms-services/galleryProcessorService/
/hippo:configuration/hippo:frontend/cms/cms-services/externalResourceService/
/hippo:configuration/hippo:derivatives/

So the node names of the nodes contains the old version. For example: uva_1_1:oneColumnSquare

Why are these nodes not renamed back to the correct namespace? Is it because of the path?

Thanks in advance,
Roberto
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Frank van Lankvelt
On Tue, Jun 26, 2012 at 11:57 AM, Roberto van der Linden
<[hidden email]> wrote:

> Hello,
>
> I have an updater module to update my CND. When this updater is finished, it
> apparently renamed some nodes at the following paths:
>
> /hippo:configuration/hippo:frontend/cms/cms-services/galleryProcessorService/
> /hippo:configuration/hippo:frontend/cms/cms-services/externalResourceService/
> /hippo:configuration/hippo:derivatives/
>
> So the node names of the nodes contains the old version. For example:
> uva_1_1:oneColumnSquare
>
> Why are these nodes not renamed back to the correct namespace? Is it because
> of the path?
>
these nodes are not of a 'uva:' prefixed nodetype.  Since they then
only have a name that's coming from the uva namespace, their prefix
will be remapped in the cnd upgrade.

cheers, Frank

> Thanks in advance,
> Roberto
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/CND-updater-module-renames-configuration-nodes-tp7578611.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Roberto van der Linden
Ok makes sense, but why are they changed in the first place?

And is there a way to prevent this? :)

Cheers,
Roberto
\
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Frank van Lankvelt
On Tue, Jun 26, 2012 at 1:08 PM, Roberto van der Linden
<[hidden email]> wrote:
> Ok makes sense, but why are they changed in the first place?
>
internally, jackrabbit stores (node) names using the full namespace
uri.  So the name is stored as
{http://www.example.com/nt/1.1}mynodename.  When the name is retrieved
through the JCR api, it is mapped back to the prefix that is used for
this uri.

During a namespace upgrade, the prefix-uri mapping is changed.  The
old uri is mapped to a versioned prefix (uva_1_1), and the new uri is
mapped to the preferred prefix (uva).  Nodes that are visited by the
namespace-visitor (i.e. nodes of a type from the namespace) are
updated to use the correct uri in jackrabbit's persistence.  But it
does not visit nodes with types from a different namespace.

hope this helps,

cheers, Frank


> And is there a way to prevent this? :)
>
> Cheers,
> Roberto
> \
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/CND-updater-module-renames-configuration-nodes-tp7578611p7578614.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Roberto van der Linden
Thank you Frank for explaining :)

It makes sense and I will fix it manually.
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Jeroen Hoffman
In reply to this post by Frank van Lankvelt

On 26-06-12 13:25, Frank van Lankvelt wrote:

> On Tue, Jun 26, 2012 at 1:08 PM, Roberto van der Linden
> <[hidden email]>  wrote:
>> Ok makes sense, but why are they changed in the first place?
>>
> internally, jackrabbit stores (node) names using the full namespace
> uri.  So the name is stored as
> {http://www.example.com/nt/1.1}mynodename.  When the name is retrieved
> through the JCR api, it is mapped back to the prefix that is used for
> this uri.
>
> During a namespace upgrade, the prefix-uri mapping is changed.  The
> old uri is mapped to a versioned prefix (uva_1_1), and the new uri is
> mapped to the preferred prefix (uva).  Nodes that are visited by the
> namespace-visitor (i.e. nodes of a type from the namespace) are
> updated to use the correct uri in jackrabbit's persistence.  But it
> does not visit nodes with types from a different namespace.
>

Above describes why this renaming takes place, but I'd expect it to be temporary
within the upgrade process, i.e. that the node names are finally renamed back to
the preferred prefix (without _1_1).

Can't is this be done automatically?

Tnx
Jeroen
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Frank van Lankvelt
On Wed, Jun 27, 2012 at 10:01 AM, Jeroen Hoffman <[hidden email]> wrote:

>
> On 26-06-12 13:25, Frank van Lankvelt wrote:
>>
>> On Tue, Jun 26, 2012 at 1:08 PM, Roberto van der Linden
>> <[hidden email]>  wrote:
>>>
>>> Ok makes sense, but why are they changed in the first place?
>>>
>> internally, jackrabbit stores (node) names using the full namespace
>> uri.  So the name is stored as
>> {http://www.example.com/nt/1.1}mynodename.  When the name is retrieved
>> through the JCR api, it is mapped back to the prefix that is used for
>> this uri.
>>
>> During a namespace upgrade, the prefix-uri mapping is changed.  The
>> old uri is mapped to a versioned prefix (uva_1_1), and the new uri is
>> mapped to the preferred prefix (uva).  Nodes that are visited by the
>> namespace-visitor (i.e. nodes of a type from the namespace) are
>> updated to use the correct uri in jackrabbit's persistence.  But it
>> does not visit nodes with types from a different namespace.
>>
> Above describes why this renaming takes place, but I'd expect it to be
> temporary within the upgrade process, i.e. that the node names are finally
> renamed back to the preferred prefix (without _1_1).
>
> Can't is this be done automatically?
>
I'm not sure if it would be possible to search for nodes with name
'uva_1_1:*'; that would be required.
Otherwise a full traversal of the repository is necessary, which I'ld
like to avoid...

cheers, Frank

> Tnx
> Jeroen
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Jeroen Hoffman


On 27-06-12 10:42, Frank van Lankvelt wrote:

> On Wed, Jun 27, 2012 at 10:01 AM, Jeroen Hoffman<[hidden email]>  wrote:
>>
>> On 26-06-12 13:25, Frank van Lankvelt wrote:
>>>
>>> On Tue, Jun 26, 2012 at 1:08 PM, Roberto van der Linden
>>> <[hidden email]>    wrote:
>>>>
>>>> Ok makes sense, but why are they changed in the first place?
>>>>
>>> internally, jackrabbit stores (node) names using the full namespace
>>> uri.  So the name is stored as
>>> {http://www.example.com/nt/1.1}mynodename.  When the name is retrieved
>>> through the JCR api, it is mapped back to the prefix that is used for
>>> this uri.
>>>
>>> During a namespace upgrade, the prefix-uri mapping is changed.  The
>>> old uri is mapped to a versioned prefix (uva_1_1), and the new uri is
>>> mapped to the preferred prefix (uva).  Nodes that are visited by the
>>> namespace-visitor (i.e. nodes of a type from the namespace) are
>>> updated to use the correct uri in jackrabbit's persistence.  But it
>>> does not visit nodes with types from a different namespace.
>>>
>> Above describes why this renaming takes place, but I'd expect it to be
>> temporary within the upgrade process, i.e. that the node names are finally
>> renamed back to the preferred prefix (without _1_1).
>>
>> Can't is this be done automatically?
>>
> I'm not sure if it would be possible to search for nodes with name
> 'uva_1_1:*'; that would be required.

That would be:

SELECT * FROM nt:base WHERE fn:name() LIKE 'uva_1_1:%'

I also tried to figure out an xpath query but failed since fn:name() only works
with the equals operator.

Jeroen

> Otherwise a full traversal of the repository is necessary, which I'ld
> like to avoid...
>
> cheers, Frank
>
>> Tnx
>> Jeroen
>>
>> _______________________________________________
>> Hippo-cms7-user mailing list and forums
>> http://www.onehippo.org/cms7/support/forums.html
>
>
>
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: CND updater module renames configuration nodes

Frank van Lankvelt
On Wed, Jun 27, 2012 at 10:53 AM, Jeroen Hoffman <[hidden email]> wrote:

>
>
> On 27-06-12 10:42, Frank van Lankvelt wrote:
>>
>> On Wed, Jun 27, 2012 at 10:01 AM, Jeroen Hoffman<[hidden email]>
>>  wrote:
>>>
>>>
>>> On 26-06-12 13:25, Frank van Lankvelt wrote:
>>>>
>>>>
>>>> On Tue, Jun 26, 2012 at 1:08 PM, Roberto van der Linden
>>>> <[hidden email]>    wrote:
>>>>>
>>>>>
>>>>> Ok makes sense, but why are they changed in the first place?
>>>>>
>>>> internally, jackrabbit stores (node) names using the full namespace
>>>> uri.  So the name is stored as
>>>> {http://www.example.com/nt/1.1}mynodename.  When the name is retrieved
>>>> through the JCR api, it is mapped back to the prefix that is used for
>>>> this uri.
>>>>
>>>> During a namespace upgrade, the prefix-uri mapping is changed.  The
>>>> old uri is mapped to a versioned prefix (uva_1_1), and the new uri is
>>>> mapped to the preferred prefix (uva).  Nodes that are visited by the
>>>> namespace-visitor (i.e. nodes of a type from the namespace) are
>>>> updated to use the correct uri in jackrabbit's persistence.  But it
>>>> does not visit nodes with types from a different namespace.
>>>>
>>> Above describes why this renaming takes place, but I'd expect it to be
>>> temporary within the upgrade process, i.e. that the node names are
>>> finally
>>> renamed back to the preferred prefix (without _1_1).
>>>
>>> Can't is this be done automatically?
>>>
>> I'm not sure if it would be possible to search for nodes with name
>> 'uva_1_1:*'; that would be required.
>
>
> That would be:
>
> SELECT * FROM nt:base WHERE fn:name() LIKE 'uva_1_1:%'
>
> I also tried to figure out an xpath query but failed since fn:name() only
> works with the equals operator.
>

thanks; I've created JIRA issue
https://issues.onehippo.com/browse/REPO-411 for this.

Actually the query already makes it easy to find the problematic nodes
after an upgrade, so having the query should already help alleviate
the problem.

cheers, Frank

> Jeroen
>
>
>> Otherwise a full traversal of the repository is necessary, which I'ld
>> like to avoid...
>>
>> cheers, Frank
>>
>>> Tnx
>>> Jeroen
>>>
>>> _______________________________________________
>>> Hippo-cms7-user mailing list and forums
>>> http://www.onehippo.org/cms7/support/forums.html
>>
>>
>>
>>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html