hclcnx / customizer

App Dev Resources for HCL Connections Customizer
https://opencode4connections.org/
15 stars 28 forks source link

Extension not loaded on special modules #22

Open weber-d opened 6 years ago

weber-d commented 6 years ago

My goal is to write an app that modify the appearance of our IBM Connections navigation. So it's required to load this app globally. According to the documentation on listing 3, setting the path to global should be exactly fit those use-case.

So my app configuration looks like this:

{
    "name": "Theme",
    "title": "Theme",
    "description": "Global theme customizations",
    "services": [
        "Customizer"
    ],
    "state": "enabled",
    "extensions": [
        {
            "name": "Stylesheets",
            "type": "com.ibm.customizer.ui",
            "payload": {
                "include-files": [
                    "theme/dist/main.css"
                ],
                "cache-headers": {
                    "cache-control": "max-age=0"
                }
            },
            "path": "global",
            "application": "Theme",
            "state": "enabled"
        }
    ]
}

For unknown reasons, this doesn't work globally as expected:

Working

NOT Working

It doesn't even work when I explicitly load the app for one of those broken modules using filters, e.g. the blog module. For this test, I used the config above and modified the payload as shown below:

            "payload": {
                "include-files": [
                    "theme/dist/main.css"
                ],
                "cache-headers": {
                    "cache-control": "max-age=0"
                },
                "match": {
                    "url": "blogs"
                }
            },

Used the example-url http://my-connections-host/blogs/roller-ui/homepage?lang=en_us from our docs for testing, but can't see my extension loaded. Also not on pages inside the blogs, e.g. view page of a blog entry.

My last try was to specify multiple apps using regular rexpressions:

                "match": {
                    "url": "homepage|blogs"
                }

Now the custom css from my app is loaded on the homepage fine, however still nothing in the blogs. We're using the pink-stack Release v6.0.0.0 Build IC6.0_CR_Integration_20171116-0701.

weber-d commented 5 years ago

What is the current state? This issue is open for about a year now without any reply...

ibmcndev commented 5 years ago

I do apologize that this has gone unnoticed for so long. Please take a look at the visual update 1 example app definition here: https://github.com/ibmcnxdev/cnx-custom-theme/blob/master/vu1-include-css.json

Rather than using "global" as a path with url matching, it has an extension / path definition for each individual service based on path.