Issue Submitting Presentation Layout HTML with the API

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi,

I have been submitting presentations to Rise using the Core API, and it's been working great for the most part. Starting today, any presentation I submit that contains a presentation gadget has been having issues. It will go into the the system, and I can see all of the changes I have submitted in the Rise admin tool. However, preview and publish just show black until I click save in the Rise Vision admin tool. Once I click save, it all of a sudden starts working. Has anything changed with the API or the presentation gadget? Is there a presentation widget I should be using instead? I am not sure where to look to fix this. 

Thanks!
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb

Posted 3 years ago

  • 1
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Hi Stephen, 
Which gadget will this be? https://github.com/Rise-Vision/gadgets 

Also please note the news about content deprecation which includes details about the gadgets.  See https://community.risevision.com/rise_vision_inc/topics/content-deprecation and https://community.risevision.com/rise_vision_inc/topics/deprecation-of-directory-financial-news-gadg...

Thanks!

Hannah | Community Success | Priority Support
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hi Hannah,

It may not be a gadget, then. When you add a presentation to a placeholder in the Rise Admin tool, it creates this string in the HTML tab. The object data value is the id of the presentation. We are using a presentation builder tool to make and submit presentation HTML using the Core API, and when we submit a presentation using this format it doesn't work.

{
"name": "Presentation Item",
"duration": "10",
"type": "presentation",
"objectReference": null,
"index": "0",
"playUntilDone": false,
"objectData": "1a953266-47d5-45e4-b468-a3ba45bd0ed4",
"additionalParams": null,
"timeDefined": true,
"startDate": null,
"endDate": null,
"startTime": null,
"endTime": null,
"recurrenceType": "Daily",
"recurrenceFrequency": "1",
"recurrenceAbsolute": true,
"recurrenceDayOfWeek": "0",
"recurrenceDayOfMonth": "1",
"recurrenceWeekOfMonth": "0",
"recurrenceMonthOfYear": "0"
}
Photo of Ashleigh

Ashleigh

  • 3,740 Points 3k badge 2x thumb
Hi,

Wondering what will happen if you set "index" to "1".
Also, if I'm correct,  you can only see your presentation in the editor once you save your work?

Thanks
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hi Ashleigh, 

I switched the code to start my index at 1 and then count up from there, but I still have the same issue. 

The changes I submit to the presentation patch API do show up formatted correctly in the html and design tabs in the editor. They won't show up in a preview or on a display until I click save and publish in the editor.

The issue only occurs when using the presentation item. If we are using our custom widgets and other Rise Vision widgets, the API works perfectly. We can patch and preview and publish to a display.

Stephen
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Hi Stephen
Thanks, I've notified the development team about this.  Can you let me know which repo is applicable if relevant? https://github.com/Rise-Vision?utf8=%E2%9C%93&query=core

Also do you have further details about the Company/CID and Presentation name/ID? I did a quick search for your gmail and came across an account with two presentations although they were last updated August and April.

Hannah | Community Success | Priority Support
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hi Hannah,

I will be back in the office on Monday, and I can send a more detailed response, but the email that's attached to the presentations I'm having issues with is tapsignageuser@gmail.com. It is a sub-company of my work email sgarrett@tappublishing.com. The name of the presentation I am patching with the core api is "TEMPLATE Presentation Builder". 

I am accessing the core-api using the Google Cloud Endpoints ... https://github.com/Rise-Vision/core-api

Thanks,

Stephen
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Hi Stephen,
Thanks for the extra information, I've just located the presentation and Company account that it is located under (4878acf4-6b14-46d5-8f08-895fc098b391).  It looks like an embedded presentation example (3 three presentations in one).  Thanks.

Hannah | Community Success | Priority Support
(Edited)
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hi Hannah,

I set up the system to replicate the issue we are having. I created two presentations and sent them using our tool. Then, I created a new presentation that has the two previous presentations embedded in it. Then I submitted that presentation. If you go into the presentation called MultiPrez (4878acf4-6b14-46d5-8f08-895fc098b391) and preview it, it will load the scroller at the bottom but not the embedded presentations. Then, if you save the MultiPrez in the Rise Admin tool and then preview it, it will work. You don't have to change any of the code in the HTML tab. You just re-save it, and it works.

This is a screencap of our tool that builds the HTML and submits the presentation to the Core API Google Cloud endpoints. The idea is that our customers can log into a subcompany of our main company using their gmail and change the weather maps they want to see on their display.



Here are the responses from each of the API calls to publish a presentation...

MultiPrez Part 1 is created and submitted by our tool. The response was...

etag: ""HRY8RK9irUbW2b5nAGfmatthjeA/Ma29K6wdtrnLvIxW1qi2WSw_xWk""
item: Object
changeDate: "2015-11-30T16:15:05.319Z"
changedBy: "tapsignageuser@gmail.com"
companyId: "4878acf4-6b14-46d5-8f08-895fc098b391"
creationDate: "2015-11-30T16:14:49.172Z"
id: "48d13f04-9470-4be4-9db3-ee98e3eaed4f"
isStoreProduct: false
isTemplate: false
layout: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>...</html>"
name: "MultiPrez Part 1"
publish: 1
revisionStatus: 0
revisionStatusName: "Published"
kind: "core#presentationItem"
result: Object
etag: ""HRY8RK9irUbW2b5nAGfmatthjeA/Ma29K6wdtrnLvIxW1qi2WSw_xWk""
item: Object
kind: "core#presentationItem"

MultiPrez Part 2 is created and submitted by our tool. The response was...

etag: ""HRY8RK9irUbW2b5nAGfmatthjeA/Vs7E9Je3V6wIpXinb2tj9DVQ4xg""
item: Object
changeDate: "2015-11-30T16:24:37.848Z"
changedBy: "tapsignageuser@gmail.com"
companyId: "4878acf4-6b14-46d5-8f08-895fc098b391"
creationDate: "2015-11-30T16:24:26.707Z"
id: "f635dbe7-0b54-422e-9f04-424f49370ddd"
isStoreProduct: false
isTemplate: false
layout: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>...</html>"
name: "MultiPrez Part 2"
publish: 1
revisionStatus: 0
revisionStatusName: "Published"
kind: "core#presentationItem"

MultiPrez is created and submitted by our tool. The response was...

etag: ""HRY8RK9irUbW2b5nAGfmatthjeA/RI6aWF65fsDsSU7Ss9CGDbOCTBQ""
item: Object
changeDate: "2015-11-30T16:40:35.109Z"
changedBy: "tapsignageuser@gmail.com"
companyId: "4878acf4-6b14-46d5-8f08-895fc098b391"
creationDate: "2015-11-30T16:40:15.404Z"
id: "1ddbccbd-5b22-4b06-9ea7-52e42aa05c46"
isStoreProduct: false
isTemplate: false
layout: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>...</html>"
name: "MultiPrez"
publish: 1
revisionStatus: 0
revisionStatusName: "Published"
kind: "core#presentationItem"

TEMPLATE Presentation Builder is patched by our tool using the layout HTML for MultiPrez. The response was...

etag: ""HRY8RK9irUbW2b5nAGfmatthjeA/Z27mWahOSuXkgynWao5xc4j9y7A""
item: Object
changeDate: "2015-11-30T16:41:34.585Z"
changedBy: "tapsignageuser@gmail.com"
companyId: "4878acf4-6b14-46d5-8f08-895fc098b391"
creationDate: "2015-09-02T20:55:20.354Z"
id: "9e110089-4922-4b6c-8b7d-7db685b7e7f3"
isStoreProduct: false
isTemplate: true
layout: "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>...</html>"
name: "TEMPLATE Presentation Builder"
publish: 0
revisionStatus: 1
revisionStatusName: "Revised"
kind: "core#presentationItem"
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Stephen,

Thanks for sending through the detailed response.  I previewed the presentations which is not loading the contents.

Running the presentation live on my Display I am seeing this error message in the Chrome console:
"Unknown RPC service: rscmd_play_sc0_pre0_ph1_0w"
I can see that there is custom widget there, try adding that as a Gadget in the company (https://rva.risevision.com/#/GADGETS?cid=4878acf4-6b14-46d5-8f08-895fc098b391) and also view the readme.md for the Web Page Widget for details ie Deployment https://github.com/Rise-Vision/widget-web-page
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Ah sorry I didn't think about you not being able to see our custom widgets. That Unknown RPC error is happening because we didn't define a play function in our current conditions widgets yet. There will be another error for the pause too. That hasn't been an issue that has kept the presentation from showing up though.

So, to prevent these errors from interfering, I remade the presentations with Scott's Youtube Widget, the Rise Image Widget, and the RSS Gadget. I still get the black placeholder with an RSS scroller at the bottom.

Also, if you are looking at those presentations, you'll see that it says "RPC Error..." in the placeholder settings popup in the Rise Admin tool. I have asked about this in another thread...

https://community.risevision.com/rise_vision_inc/topics/widget-objectreference-variable-usage

This should be okay because we are passing in the additional parameters string directly into the system.
Photo of HSuarez

HSuarez

  • 11,896 Points 10k badge 2x thumb
Hi Stephen,

Thanks. I forwarded the thread to the Apps team and their response was that embedding presentations require an extra parameter when submitting via Core API. It is "embeddedIds", an array containing the IDs of embedded presentations.  It's a required parameter that was always required, no recent changes. 

Thanks,
Hannah
Photo of Stephen Garrett

Stephen Garrett, Champion

  • 2,674 Points 2k badge 2x thumb
Hannah,

You're my hero! That was definitely the issue, and you are right, it has been in the documentation the whole time. I'm slipping.

Stephen