cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Asset Collection breaks on Refresh

cfe
Champ in-the-making
Champ in-the-making
Hello,

first of all id like to say i  enjoy working with Web Quick Start and this forum is really really helpfull, thank you so much!

I tried out dynamic asset collections and i'm experiencing some rather strange behavior:
I changed the CMIS-Query so that it shows all articles in a section while excluding a paticular asset, containing general Information:

SELECT d.* from cmis:document AS  d WHERE in_tree(d, '${section:.}') AND d.cmis:objectTypeId='D:ws:article' AND d.cmis:name not like ' WANTTOEXCLUDE_ASSET.html '

When I Save that Query and look again at the collectiosn Metadata, it shows the articles as desired. (also does the Editorial WS), after some time (supposedly the defined interval) the collection is refreshed, now containing the article which should be excluded.

If i reapply the Query it works, only until the next refresh…

Your help is very much appreciated.

greetings
Chris
14 REPLIES 14

bremmington
Champ on-the-rise
Champ on-the-rise
That's very odd. We'll look into it for you.

ben
Champ in-the-making
Champ in-the-making
Hi Chris,

Yes, that is odd! As im sure you are aware we use a similar query for the blogs section as default. I did notice you had some spaces within the html file name, or was that just for illustrative purposes?

Try changing:
AND d.cmis:name not like ' WANTTOEXCLUDE_ASSET.html '
to:
AND d.cmis:name not like 'WANTTOEXCLUDE_ASSET.html'

Ben.

cfe
Champ in-the-making
Champ in-the-making
Hallo Ben,

yes, i inherited the Statement from the Blog-Section, but i also modified some others (like those to be found in latest.articles) always with the same result.

An yes, the given asset-name was just for the illustration, the actual query doesnt have the blank in it…

bremmington
Champ on-the-rise
Champ on-the-rise
We've failed to reproduce this problem here so far. Please would you confirm what version you are using and environment details (OS, locale, etc)?

The most perplexing part of this is that precisely the same code is used when executing the query when first saved and subsequently when refreshing the asset collection. Please would you confirm whether the user who you are logged in as when you update the asset collection query has permission to read the asset that you are trying to exclude from the results?

cfe
Champ in-the-making
Champ in-the-making
Hello,

Now im comfused too, after retrying the query today, it doesnt work at all.

Here my System & Environment:
Alfresco: Community v3.4.0 - (d 3370) schema 4113
OS:1 Windows XP

bremmington
Champ on-the-rise
Champ on-the-rise
Oh dear. In what way does it not work? Any errors in the log?

cfe
Champ in-the-making
Champ in-the-making
Could this be a locale thing?

Now i set all the locales align: OS - JAVA_OPTS - Browser, and it seems to work at least partly

Is there any part in Alfresco configuration where i need to set the locale?

Thank You,

greetings,

Chris

bremmington
Champ on-the-rise
Champ on-the-rise
When you say "at least partly" what exactly do you mean? There have been other reports of issues on this forum that make me think there may be a locale-related problem, but we've never been able to reproduce it and people have never provided sufficient information to help us to home in on it. With your issue, I can't see how locale would cause the query to work correctly the first time but not on subsequent runs, but I guess nothing's impossible. If you would be able to provide a detailed account of how we can reproduce the issue then that would be extremely useful. Something along the lines of:

  1. Create a new section below the website root named "mysection"

  2. Create four articles named "myfirstarticle.html", "mysecondarticle.html", "mythirdarticle.html", and "articletoexclude.html"

  3. Create a new dynamic asset collection in the "mysection" section and enter this query that should find all articles except for "articletoexclude.html": ……
Add details of your system in as much detail as you can. As I say, I have no idea if this can be related to locale, but give us the information and we'll try to build a system that mirrors it.

cfe
Champ in-the-making
Champ in-the-making
Ok, i spent a lot of time, being able to reproduce it, then again not.

The System is set up like mentioned above, all locales are set to de_DE, im using FF as webclient (locale set de_DE), doing all with admin user…

* I create a section CollTest
* There i create three articles: "WANTTOEXLUDE.html" "Test1.html" ans "Test2.html"
* i edit Metadate of the automatically created: "latest.articles" collection, to show all articles except "WANTTOEXCLUDE.html"
* Select Submit in the collection-dialog.
Result: the clause works, "WANTTOEXCLUDE.html" isnt part of the collection

*I wait some time
Result: WANTTOEXCLUDE becomes part of the collection

* I change the locale in Firefox to "En_US"
*Restart FF
* Go to the Collection-Metadata-Dialog
*Remove the selection formula
*Submit
*Reissue the formula
*Submit
Now the collection is stable.

*If i try to change back the locale, restart FF
*Remove and Reissue the selection formuar
–> doesnt work at all.

After some back and forth there seems to be a way to make it work again.

Probably this is not linked to the locale but some continuity-issue….
So is there a LOCALE explicitly to be set in Alfresco -Configuration, i get something like this in my logs:

WARN : org.apache.myfaces.shared_impl.util.LocaleUtils - Locale name in faces-config.xml null or empty, setting locale to default locale : de_DE