Why am I getting intermittent Pocket Query errors?

John Love July 8, 2015

We use Pocket Query to display information on a RefinedWiki dashboard.  Most times it works great, but periodically we receive an error like below.  A browser refresh usually resolves it. Our database is MySQL.  Any thoughts?

Screen Shot 2015-07-08 at 8.53.51 PM.png

3 answers

1 accepted

0 votes
Answer accepted
Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2015

Hi John,

We're currently working on PocketQuery version 2.0 which I think should solve your issue. Could you try this milestone version and observe during the next time if the issue reoccurs?

Regards, Felix (Scandio)

John Love July 10, 2015

Will do!  Thanks.

John Love July 10, 2015

This caused an immediate issue with the following template. The line $PocketQuery.renderXhtml($pq_xhtml) was displaying the user's profile picture, but now it just displays $PocketQuery.renderXhtml($pq_xhtml) followed by the rest of the returned data. #macro(pq_getXhtml $username) <ac:structured-macro ac:name="profile-picture"> <ac:parameter ac:name="User">$username</ac:parameter> </ac:structured-macro> #end #foreach($row in $result) #set($pq_xhtml = "#pq_getXhtml($row.UserName)") <div style="width: 320px !important;" class="upp-profile-macro"> <div class="uppuserlogo"> $PocketQuery.renderXhtml($pq_xhtml) </div> <div style="width: 240px;" class="upp-basic-userdata"> <div style="width: 230px;" class="anbdprofileinfo"><a href=/display/~$row.UserName>$row.FullName</a></div> <div style="width: 230px;" class="anbdprofileinfo"><a href="mailto:$row.email">$row.email</a></div> </div> </div> #end

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2015

Ah, I see. Please try two things: 1.) Render the profile macro: $PocketQuery.renderProfileMacro($row.UserName) 2.) If you really need the picture only: #set($pq_params = { 'User': $row.UserName }) $PocketQuery.renderMacro("profile-picture", $pq_params) With the release of 2.0 we'll provide proper documentation on all this, of course ;). Please let me know if this works!

John Love July 10, 2015

The first solution did display the profile, but the second one is really what I need and it gives me... "Error rendering macro 'profile-picture' : No user parameter specified" I tried messing with the "set" values, but I had no luck. Can you verify the syntax for me?

John Love July 13, 2015

Felix, Did you see my comment regarding the Option 2 syntax. I've had no luck the the renderMacro. Thanks

John Love July 13, 2015

Felix, With a little CSS, I was able to get solution one to do what I need for now. I would like to see solution 2 work though. Also, any word on when 2.0 will be out and is the version you gave me compatible with 4.3.7? Our Prod instance and one test instance remain at that level for hopefully only a few more weeks, but I though I would ask.

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2015

Hi John! Could you try if it works with this code: $PocketQuery.renderMacro('profile-picture', { 'parameters':{ 'User':$row.UserName } }) We will release PocketQuery 2.0 some time later this year, we're not sure about it yet. Unfortunately, it would be too much efforts to fix your issue in the current version 1.x on marketplace. So we can only offer you to use our milestone releases until 2.0 is released.

John Love July 13, 2015

That did it! Thank you so much. I'll let you know if the errors reappear. You may not be able to answer this, but how much longer do you expect this plugin to remain free. It is a very useful plugin and I know it won't be free forever, but we do like free. Thanks!

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2015

Glad it solved it! I'll put it this way: the current functionality will be free forever ;). If you like PocketQuery, would you consider leaving a review at the marketplace? (If you didn't do so already)

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 13, 2015

And: can you "accept" my answer? :)

Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 14, 2015

Thank you very much!

0 votes
John Love July 10, 2015

Felix,

I finally got the error again.  Below are the Debug & Stack Trace file.  I ran a support zip capturing all files.  It is rather large.  Are there particular files that I can send you?

 

Thanks!

0 votes
Felix Grund (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 8, 2015

Hi John,

Firstly, thank you for your interest in PocketQuery! This error message is very generic and I need some more information. If this happens periodically, I guess this has something to do with the database connection. Can you please add a log level DEBUG in "ConfluenceAdmin > Logging and Profiling" for this class: de.scandio.confluence.plugins.pocketquery.util.LogUtil ? If this is set, more error details will be written in the log file. Also, it would be very useful to set the debug checkbox in the macro, but this might not be desired if the error occurs only periodically. Maybe you can embed the macro in a test page and try to reproduce the problem with "debug" checked and then provide us the stack trace shown on the page.

Looking forward to hear from you again!

Regards, Felix (Scandio)

John Love July 9, 2015

I have turned on logging and have set up a test page with debug on in the macro.  I will let you know.

I really hope I can get past this issue, because it's a fabulous plugin.  Even with my novice knowledge of the templates, I have been able to create some really nice results.  Right now we are just pulling info from our Communardo User Profiles Plugin to display birthdays, anniversaries, phone list, etc, but down the road we may want to connect it to our JIRA database and do some custom reporting. 

Thanks for your quick response and I will get back to you when I see the error.  Oddly enough, I got it several times yesterday afternoon, but nothing last night and this morning and I'm working on a test instance with maybe 1 or 2 users, so I cannot imagine Confluence traffic is an issue here.  Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events