Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Having trouble viewing a widget

We are trying to create a handful of widgets so I've created a new extension to house them, WidgetLibrary. I'm starting off with a widget called hyc so I added an entrypoint for it using q2 tecton (see WidgetLibrary.py config below) and added a path to the router inside of extension.py (snippets below).

When I try to go to https://stack.q2developer.com/sdk/unify/ardent/uux.aspx#/extension/WidgetLibrary/Main I can view the default form from Main. But if I go to https://stack.q2developer.com/sdk/unify/ardent/uux.aspx#/extension/WidgetLibrary/hyc I get a 404

2023-08-09T19:57:54.282 tornado.access WARNING 404 GET /WidgetLibrary/assets/hyc?tct-id=WidgetLibrary_hyc_widget.WidgetLibrary.hyc&tct-maxHeight=&tct-maxWidth=&tct-outlet-name=WidgetLibrary_hyc_widget (127.0.0.1) 2.39ms

A similar thing occurs if I try to view the widget on a position on a page (like activityCenter.top). If I use Main it shows up but if I use hyc I get an endless spinner and a 404 in the terminal. Any idea how I can fix this?

FEATURE = {
    "core": False,
    "modules": {
        "Main": {
            "overpanel": False,
            "primary": True,
            "navigable": True,
            "formPostAuth": False,
            "url": "{BASE_URL}/index.html",
            "meta": {
                "type": {
                    "shape": "Content",
                    "context": "None",
                    "overpanelReady": False
                }
            }
        },
        "hyc": {
            "overpanel": False,
            "primary": False,
            "navigable": True,
            "formPostAuth": False,
            "url": "{BASE_URL}/hyc",
            "meta": {
                "type": {
                    "shape": "Content",
                    "context": "None",
                    "overpanelReady": True
                }
            }
        }
    }
}
router.update({
            'default': self.default, 
            'submit': self.submit, 
            'hyc': self.hyc_widget
        })
				
......

    async def hyc_widget(self):
        template = self.get_template('hyc_widget.html.jinja2', {})
				...... #more code here
				return html;
0

That isn't working. I just get the spinner and a 404. If I switch it to WidgetLibrary.Main that works for Main but I can't get it to work for hyc.

— Todd Culbertson   3 years ago
0

Have you tried changing hyc_widget to just hyc? Just another thought. I had issues with widgets, but it was a year ago. I want to say the naming of the route needed to be the same as the url.

— Alan Perse   3 years ago
0

I have tried that but it did not help. I just tried it again and removed all "hyc_widget" from the code and replaced with just "hyc". I am still getting the same 404. 2023-08-10T16:01:11.007 tornado.access WARNING 404 GET /WidgetLibrary/assets/hyc?tct-id=WidgetLibrary_hyc_widget.WidgetLibrary.hyc&tct-maxHeight=&tct-maxWidth=&tct-outlet-name=WidgetLibrary_hyc_widget (127.0.0.1) 1.49ms

— Todd Culbertson   3 years ago
Votes Newest

Answers


Hi Todd!

Is this a server-side rendered extension or a client-side rendered extension?

With a server side rendered extension I would expect to see entrypoint urls like these for Main and a secondary entrypoint based off the python route setup:

"url": "./sdk/authenticated/{featureName}",
"url": "./sdk/authenticated/{featureName}/hyc",

With a client side rendered extension using hash routing I would expect something like these:

"url": "{BASE_URL}/index.html",
"url": "{BASE_URL}/index.html#/hyc",

Without seeing the code, this looks like a little bit of a mixture of both.

Posted 3 years ago
0

Yes, this was the issue. I'm not sure how I messed it up but I created it as a CSR extension instead of a SSR extension. As a result there were no assets to build which is why I kept getting the 404. Once I fixed it to be SSR everything started working.

— Todd Culbertson   3 years ago
211 Views
1 Answer
3 years ago
3 years ago