You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Eric Norman (JIRA)" <ji...@apache.org> on 2010/08/07 21:24:18 UTC

[jira] Resolved: (SLING-1403) The Initial Content Loader nodes are not searchable

     [ https://issues.apache.org/jira/browse/SLING-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Norman resolved SLING-1403.
--------------------------------

    Resolution: Cannot Reproduce

Hi Róbert,

I attempted to reproduce this issue but was not able to replicate the results you described:

These were the steps I used:
1. Build clean sling launchpad from the trunk

2. Build the attached test bundle and deploy to the sling launchpad

3. curl http://localhost:8888/sites/test1.semmi.se.json
{"email":"robson@semmi.se","headline":"Fejléc","googleApiKey":"google_api_key_semmi.se","template":"8899","contactName":"Robert Csakany","owner":"
esayfasi","slogan":"Jelmondat","jcr:mixinTypes":["rep:AccessControllable"],"jcr:primaryType":"esayfasi:TemplatedSite"}

4. curl "http://localhost:8888/.query.json?queryType=xpath&statement=//element(*,esayfasi:TemplatedSite)"
[{"name":"test1.semmi.se","slogan":"Jelmondat","contactName":"Robert Csakany","jcr:score":6373,"googleApiKey":"google_api_key_semmi.se","owner":"esayf
asi","template":"8899","jcr:primaryType":"esayfasi:TemplatedSite","email":"robson@semmi.se","jcr:path":"/sites/test1.semmi.se","headline":"Fejléc"
}]

As you can see from step #4, the query for the content loaded by the content loader was included in the query results.

I am resolving this issue as "Cannot Reproduce" for now.  Please reopen if you can provide additional steps that demonstrate how to reproduce the issue.

> 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
>         Attachments: org.apache.sling1403.zip
>
>
> 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": "robson@semmi.se",
> 		"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":"robson@semmi.se","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:admin@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.