[
https://issues.apache.org/jira/browse/SLING-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Norman reassigned SLING-1403:
----------------------------------
Assignee: Eric Norman
> The Initial Content Loader nodes are not searchable
> ---------------------------------------------------
>
> Key: SLING-1403
> URL: https://issues.apache.org/jira/browse/SLING-1403
> Project: Sling
> Issue Type: Bug
> Components: JCR
> Reporter: Róbert Csákány
> Assignee: Eric Norman
>
> I've made a Budle that have the following datas:
> ESAYFASI.CND:
> <esayfasi = 'http://esayfasi.com/esayfasi/1.0'>
> <nt = 'http://www.jcp.org/jcr/nt/1.0'>
> <sling = 'http://sling.apache.org/jcr/sling/1.0'>
> [esayfasi:SimpleSite] > nt:unstructured
> - 'owner' (String)
> [esayfasi:SimplePage] > nt:unstructured
> [esayfasi:SignupPage] > esayfasi:SimplePage
> [esayfasi:TemplatedSite] > esayfasi:SimpleSite
> - 'template' (String)
> - 'headline' (String)
> - 'slogan' (String)
> - 'googleApiKey' (String)
> - 'contactName' (String)
> - 'email' (String)
> - 'addressLine1' (String)
> - 'addressLine2' (String)
> - 'addressLine3' (String)
> - 'addressLine4' (String)
> - 'addressLine5' (String)
> - 'phoneNumber' (String)
> - 'faxNumber' (String)
> [esayfasi:TemplatedPage] > esayfasi:SimplePage
> - 'title' (String)
> - 'metaKeywords' (String)
> - 'menuName' (String)
> - 'menuOrder' (Long)
> - 'pageName' (String)
> - 'content' (String)
> And sites.json:
> {
> "name":"sites",
> "jcr:primaryType" : "sling:Folder",
> "www.semmi.se":{
> "jcr:primaryType":"esayfasi:SimpleSite",
> "owner": "admin",
> "signup":{
> "jcr:primaryType":"esayfasi:SignupPage"
> },
> "index":{
> "jcr:primaryType":"esayfasi:SimplePage"
> },
> "security:acl" : [
> {
> "principal" : "esayfasi",
> "granted" : [
> "jcr:read",
> "jcr:write"
> ]
> }
> ]
> },
> "test1.semmi.se":{
> "jcr:primaryType": "esayfasi:TemplatedSite",
> "owner": "esayfasi",
> "template": "8899",
> "headline": "Fejléc",
> "googleApiKey": "google_api_key_semmi.se",
> "contactName": "Robert Csakany",
> "email": "[email protected]",
> "slogan": "Jelmondat",
> "index": {
> "jcr:primaryType": "esayfasi:TemplatedPage",
> "title":"My first page",
> "menuName":"Home",
> "menuOrder": 1,
> "content": "<h1>Welcome!</h1>"
> },
> "security:acl" : [
> {
> "principal" : "esayfasi",
> "granted" : [
> "jcr:read",
> "jcr:write"
> ]
> }
> ]
> }
> }
> POM.XML:
> <!-- Bundling the sample project -->
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <extensions>true</extensions>
> <configuration>
> <instructions>
> <!-- we have to export for the classes to be visible
> -->
> <Export-Package>
> com.esayfasi.jsp.*;version=${pom.version}
> </Export-Package>
> <!-- node types to be created -->
> <Sling-Nodetypes>
> SLING-INF/nodetypes/esayfasi.cnd
> </Sling-Nodetypes>
>
> <!-- initial content to be loaded on bundle
> installation -->
> <Sling-Initial-Content>
> SLING-INF/content;uninstall:=true
> </Sling-Initial-Content>
> <!-- Bundle supplied resource prefixes -->
> <Include-Resource>
> {maven-resources},src/main/scripts
> </Include-Resource>
> <Sling-Bundle-Resources>
> /apps/sling/sample,
> /classes/com/esayfasi
> </Sling-Bundle-Resources>
> </instructions>
> </configuration>
> </plugin>
> When I deploy the bundle everything seems ok.
> If I query http://localhost:8080/sites/test1.semmi.se.json I have the
> following:
> {"template":"8899","googleApiKey":"google_api_key_semmi.se","headline":"Fejléc","contactName":"Robert
>
> Csakany","jcr:mixinTypes":["rep:AccessControllable"],"owner":"esayfasi","email":"[email protected]","slogan":"Jelmondat","jcr:primaryType":"esayfasi:TemplatedSite"}
> So it seems OK. But when I make the following:
> http://localhost:8080/.query.json?queryType=xpath&statement=//element(*,esayfasi:TemplatedSite)
> I have the result:
> []
> I've tried a lot of query-style with no results. I've reindex jackrabbit, but
> didn't help.
> After I tried create a node with CURL:
> curl -F jcr:primaryType=esayfasi:TemplatedSite -F slogan="Test" -F
> owner=admin http://admin:ad...@localhost:8080/sites/test2.semmi.se
> and after re-run the query and I've got the following result:
> [{"name":"test2.semmi.se","jcr:path":"/sites/test2.semmi.se","jcr:score":5677,"slogan":"Test","owner":"admin","jcr:primaryType":"esayfasi:TemplatedSite"}]
> So It seems the nodes are generated by Initial-Content-Loader are hidden from
> query.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.