[4.1.1] Java API can't find contentlet, but query tool can?

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

[4.1.1] Java API can't find contentlet, but query tool can?

Nathan Keiter

When using the ContentletAPI.findContentletByIdentifier() method I get this error:

 

com.dotmarketing.portlets.contentlet.business.DotContentletStateException: Can't find contentlet: 41c722b0-4766-45ee-b185-9df939840926 lang:1 live:true

 

However, if I run the exact same query in the query tool, it finds the content.

 

 

What gives?

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/c783b54315e4498c964e07650c8d272b%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [4.1.1] Java API can't find contentlet, but query tool can?

wezell1
Maybe try with the pluses:


+identifier:41c722b0-4766-45ee-b185-9df939840926 +lang:1 +live:true 


Also, check permissions.

On Wed, Dec 20, 2017 at 7:16 PM, Nathan Keiter <[hidden email]> wrote:

When using the ContentletAPI.findContentletByIdentifier() method I get this error:

 

com.dotmarketing.portlets.contentlet.business.DotContentletStateException: Can't find contentlet: 41c722b0-4766-45ee-b185-9df939840926 lang:1 live:true

 

However, if I run the exact same query in the query tool, it finds the content.

 

 

What gives?

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" value="+17173376993" target="_blank">717.337.6993

https://www.gettysburg.edu

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/c783b54315e4498c964e07650c8d272b%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.



--



3059 Grand Avenue
Suite 410-B
Miami FL 33133
Main: 
305-900-2001 | Direct: 978.294.9429

   

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAPL0VyFPBcCiVifsJHcdFn-ocmpq8U7bRT%3D0Pro7rcnec2JeBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: [4.1.1] Java API can't find contentlet, but query tool can?

Nathan Keiter

Ok, so it turns out the content I was looking for wasn’t live.

 

Thanks Will.

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Will Ezell
Sent: Wednesday, December 20, 2017 7:29 PM
To: [hidden email]
Subject: Re: [dotcms] [4.1.1] Java API can't find contentlet, but query tool can?

 

Maybe try with the pluses:

+identifier:41c722b0-4766-45ee-b185-9df939840926 +lang:1 +live:true 

 

 

Also, check permissions.

 

On Wed, Dec 20, 2017 at 7:16 PM, Nathan Keiter <[hidden email]> wrote:

When using the ContentletAPI.findContentletByIdentifier() method I get this error:

 

com.dotmarketing.portlets.contentlet.business.DotContentletStateException: Can't find contentlet: 41c722b0-4766-45ee-b185-9df939840926 lang:1 live:true

 

However, if I run the exact same query in the query tool, it finds the content.

 

 

What gives?

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/c783b54315e4498c964e07650c8d272b%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.



 

--

 

 

3059 Grand Avenue

Suite 410-B

Miami FL 33133

Main: 305-900-2001 | Direct: 978.294.9429

 

   

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CAPL0VyFPBcCiVifsJHcdFn-ocmpq8U7bRT%3D0Pro7rcnec2JeBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/cacf2a8ddcf34893a3ea440d62fd0350%40exch13c.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.