Jump to content

Widget does not show up in Live Board (but worked locally)


ossipetz

Recommended Posts

Hallo

I've created an application that contains only one widget to show the online users on a rocket.chat server. This does work locally but after I downloaded the application from the adminCP und installed it on the live board the blocks don't show up :(

Working locally in DEV Mode the new Widget shows in the content blocks and adding the widget also works nicely.

The installation in the live board using the .tar file downloaded from the local setup worked fine, no errors shown or found (yet). I also cleared the caches in the support section of the adminCP. Also tried the default theme and language - just to be safe. But no luck. The new block does not appear. I can see the new template and the new translation keys. So it seemed to work at least partially.

Is there a way to figure out why its not shown? Any hints would be great!

Screenshot 2017-06-04 19.43.01.png

Screenshot 2017-06-04 19.42.37.png

Update: can't figure out what is wrong or missing :(

If anyone has a Rocket.Chat server and wants to give it a try (no warranties given, maybe on the test-forum first ;)) here is the current version: tfrocketchat-1.0.4.tar (simply add the widget, hit edit to set the url and username / password for the rest api user).

Link to comment
Share on other sites

3 hours ago, newbie LAC said:

Hello,

You have an error in widget template variables


$members=array(), $memberCount=0, $chatVersion=

Look at $chatVersion= You should set up default value

*woooot* but I swear I added a default value to every... ooooooh :ph34r: I messed up the quotes... 

so for anyone else make sure to not mix "" and '' in a stupid way like me:

wrong version (the parameters="" using double quotes, so chatVersion must absolutely not use those too):

<ips:template parameters="$members=array(), $memberCount=0, $chatVersion="", $orientation='vertical'" />

correct (outer limits use "", inner values use ''):

<ips:template parameters="$members=array(), $memberCount=0, $chatVersion='', $orientation='vertical'" />


Here the fixed version: tfrocketchat-1.0.5.tar - Gonna polish a few things and then publish it in the marketplace.

Thaaaanks a lot! :)

Link to comment
Share on other sites

On 05/06/2017 at 11:14 AM, ossipetz said:

*woooot* but I swear I added a default value to every... ooooooh :ph34r: I messed up the quotes... 

so for anyone else make sure to not mix "" and '' in a stupid way like me:

wrong version (the parameters="" using double quotes, so chatVersion must absolutely not use those too):


<ips:template parameters="$members=array(), $memberCount=0, $chatVersion="", $orientation='vertical'" />

correct (outer limits use "", inner values use ''):


<ips:template parameters="$members=array(), $memberCount=0, $chatVersion='', $orientation='vertical'" />


Here the fixed version: tfrocketchat-1.0.5.tar - Gonna polish a few things and then publish it in the marketplace.

Thaaaanks a lot! :)

If your only making a widget you should just of created a plugin, there is no need for a application for just a widget, I love making applications but 99% of them I wind up turning into plugins as it's easier for me and the user in the long run

Link to comment
Share on other sites

Hello

Thanks for the hint. To be honest I could not really figure out in the developer documentation why there are plugins and applications at all. And I found the documentation for applications better :-) Everything I use from the marketplace is an Application, so I just assumed plugins are a bit old fashioned.

I still think I will also add a hook into this application that updates the top-level menu item (similar to what the ipb chat did). Not sure if plugins can do that - even with applications (I looked into the Chat sources) it seems to be a bit of a hack :ph34r: (that number indicator of active users in the chat that was on the "Chat" menu)

But good to know plugins are not "dead" :-)

 

Link to comment
Share on other sites

On 8.6.2017 at 1:04 PM, ossipetz said:

Hello

Thanks for the hint. To be honest I could not really figure out in the developer documentation why there are plugins and applications at all. And I found the documentation for applications better :-) Everything I use from the marketplace is an Application, so I just assumed plugins are a bit old fashioned.

I still think I will also add a hook into this application that updates the top-level menu item (similar to what the ipb chat did). Not sure if plugins can do that - even with applications (I looked into the Chat sources) it seems to be a bit of a hack :ph34r: (that number indicator of active users in the chat that was on the "Chat" menu)

But good to know plugins are not "dead" :-)

 

Plugins are fine:)  I prefer them to applications if I know that I'll not need an own controller and all I want is to change something in the output via a theme hook or if I want to customize an existing method via a code hook.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...