Comments (3)
Good catch!
from uportal.
Hi!
I could not reproduce the bug with the steps presented in the issue,
however, I could break the sitemap with the following steps:
- Visit http://localhost:8080/uPortal/
- Scroll to the bottom of the page, click the "uPortal Links" entry in the sitemap.
- Which leads to the login page; sign in with "admin".
- The sitemap will not work on any of the pages anymore, no matter where I navigate. (The "unable to load sitemap" message is shown.)
As a first step, I've corrected the typo, suggested in the issue. This did not solve the Sitemap problem,
but at least it makes the ReferenceError
disappear, so another error message is visible in the Console:
Unable to load sitemap. Error: Missing required object path [layout.navigation.tabs] > content > content
at render.uP:739
at aY (lodash.min.js:1)
at Function.mh (lodash.min.js:6)
at sitemapJsonCheck (render.uP:737)
at render.uP:780
at aY (lodash.min.js:1)
at Function.mh (lodash.min.js:6)
at render.uP:779
at aY (lodash.min.js:1)
at Function.mh (lodash.min.js:6)
I've compared the layout.json
that is downloaded by the Sitemap script, and it seems that it contains an additional invalid entry when it can't render. It is indeed missing the tabs > content > content
entry:
"tabs": [
{
"ID": "ft1",
"name": "uPortal Links",
"type": "regular",
"hidden": "false",
"unremovable": "true",
"immutable": "true",
"addChildAllowed": "false",
"deleteAllowed": "false",
"editAllowed": "false",
"moveAllowed": "false",
"precedence": "100.0",
"transient": "true",
"tabGroup": "DEFAULT_TABGROUP",
"width": "100%",
"content": [
{
"_objectType": "portlet",
"url": "/uPortal/api/v4-3/portlet/uportal-links.html",
"iconUrl": "/uPortal/media/skins/icons/mobile/links.png",
"ID": "ctf1",
"typeID": "3",
"deleteAllowed": "false",
"moveAllowed": "false",
"name": "uPortal Links",
"description": "Useful uPortal links.",
"title": "uPortal Links",
"chanID": "112",
"fname": "uportal-links",
"timeout": "10000",
"transient": "true",
"windowState": "maximized",
"portletMode": "view",
"portletName": "cms",
"lifecycleState": "PUBLISHED",
"webAppName": "\/SimpleContentPortlet",
"parameters": {
"mobileIconUrl": "\/uPortal\/media\/skins\/icons\/mobile\/links.png",
"iconUrl": "\/ResourceServingWebapp\/rs\/tango\/0.8.90\/32x32\/mimetypes\/text-html.png",
"disableDynamicTitle": "true",
"configurable": "true"
}
}
]
},
...
The "bad" JSON contains all the good data as well, but currently, the sitemap script blows up as it encounters the first entry it can't handle.
I think there are (at least) two ways to solve this problem:
- modify the layout.json to exclude such entries
- make the sitemap generation script more resilient
I am not familiar with the layout.json generation (and it might be used somewhere else outside the sitemap), so I created a fix using the latter approach: now the sitemap simply ignores the elements it does not know.
Please let me know if this approach is okay.
Cheers and thanks,
David
from uportal.
Please let me know if this approach is okay.
Speaking in general terms, I think there's nothing wrong with this approach.
from uportal.
Related Issues (20)
- Some personalization tokens not being caught HOT 1
- Dynamic Portlet Title does not work
- docs: Migrate docs about merging attribute sources from Confluence
- Updating portlet from UI remove categories
- Expose uPortal CSS variable
- Enhance /uPortal/health-check HOT 4
- Personalization Filter NPE with cookiecheck
- When not using predefined RSS feeds, single URL RSS feeds do not work
- No title personalization of maximized portlet when name is in tab
- Fix Approved publishing date options for CMS Portlet lifecycle
- Portlet preference is not personalized HOT 1
- Personalization resolves tokens when editing a portlet in the UX (but shouldn't) HOT 1
- Search auto-complete does not support keywords
- Personalization not applied on portlet definitions retrieved from APIs HOT 1
- OIDC documentation
- Health Checker DB class fails on JNDI datasources
- RSS Feed failure requires server restart to recover
- uPortal is not recognizing an admin user in some flows
- Refactor Potential Implementation and Design Smells HOT 2
- Some user favorites disappear after a favorited portlet gets deleted and the user updates their favorites
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uportal.