Univention Bugzilla – Bug 52792
Portal: Allow multiple paths for the portal
Last modified: 2024-02-12 13:54:05 CET
The default path /univention/portal/ would serve the default portal. But specialized portals may be used under different paths. E.g., /univention/umc/
git:0aec3d6af374790e644a1af26fb29a4c530ba9dd E:0004-12: conffiles/etc/apache2/sites-available/univention-portal.conf: template file contains variables that are not registered in file entry: - portal/paths E:0004-36: Module file "symlink_portal" does not exist → move to conffiles E:0010-2: symlink_portal: file contains no copyright text block W:0020-W605: conffiles/etc/apache2/ucs-sites.conf.d/univention-portal.conf:17:-209: invalid escape sequence '\.' W:0020-W605: conffiles/etc/apache2/ucs-sites.conf.d/univention-portal.conf:17:-196: invalid escape sequence '\.' management/univention-portal/symlink_portal → this is not python 2 compatible. And it is not indented with tabs.
./python/univention/portal/extensions/portal.py:34:1: F401 'requests' imported but unused ./python/univention/portal/extensions/portal.py:319:10: F821 undefined name 'portal'
Fixed in univention-portal 4.0.4-7A~5.0.0.202102160223 New portals can be added by setting ucr set portal/paths='/univention/portal/, ..., ...' where the default is now: ucr set portal/paths='/univention/portal/, /univention/umc/' (You have to restart apache and univention-portal-server by hand.) It works by removing or adding parts in the Apache config and symlinks to /usr/share/univention-portal/ A dummy implementation of the UMC overview can be found at /univention/umc/ if you did univention-portal add-default --update (or, later, if it is a brand new DVD) The usefulness / beauty of the UMC overview is not part of this bug.
> management/univention-portal/symlink_portal > → this is not python 2 compatible. And it is not indented with tabs. It does not need to be. It is an independent script.
(In reply to Dirk Wiesenthal from comment #4) > > management/univention-portal/symlink_portal > > → this is not python 2 compatible. And it is not indented with tabs. > > It does not need to be. It is an independent script. You are right, that's nice!: python2 $(which ucr) set portal/paths='/univention/portal/, /univention/umc/'
Are you sure the following line works in every environment?: git:b7c62853ec2e3007c74290750b60272498b7d649 + client = Client(None, "Administrator", "univention")
During upgrade on a newly installed system I see the errors: File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf Traceback (most recent call last): File "<stdin>", line 9, in <module> AttributeError: 'NoneType' object has no attribute 'split' File: /etc/logrotate.d/univention-portal Script: /etc/univention/templates/scripts/symlink_portal File: /etc/apache2/sites-available/univention-portal.conf Traceback (most recent call last): File "<stdin>", line 10, in <module> AttributeError: 'NoneType' object has no attribute 'split'
# systemctl restart apache2.service # curl http://localhost/univention/umc/ <html><title>404: Not Found</title><body>404: Not Found</body></html> → Nothing available after installation.
Created attachment 10621 [details] Screenshot * The folder Installed Applications should not be displayed if it has no content (like UMC). * The tiles have no icons. * The description/title of a folder is hardcoded "Title" instead of e.g. "Domain". * It's not possible to use any wished path: # ucr set portal/paths='/univention/portal/, /univention/umc/, /dataport/phoenix/' Setting portal/paths Script: /etc/univention/templates/scripts/symlink_portal Removing portal link to /var/www/univention/xxx... Linking /var/www/dataport/phoenix to portal content... Traceback (most recent call last): File "/etc/univention/templates/scripts/symlink_portal", line 63, in <module> os.symlink(portal_path, path) FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/univention-portal' -> '/var/www/dataport/phoenix' File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf File: /etc/apache2/sites-available/univention-portal.conf
* The links are not displayed. They seem to link to http://www.univention.com/. Refused to display 'https://www.univention.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. * The items in the folder are not sorted like it's done in UMC (sort by "priority" key).
I addressed the tracebacks in univention-portal 4.0.4-8A~5.0.0.202102171734 There may still be problems with paths not starting with /univention/. I added a hint in the UCRV description: One may need additional Apache config that we do not want to do automatically. (I'd say) As for the UMC issues, I will open a new bug for them. It is out of scope of this bug.
OK: The basics work so far. It's not possible to use Paths not under /univention/. All the other points mentioned in the comments are moved to another user story. You can reopen this bug if you plan to use it for the further adjustments.
I found another error: # ucr set portal/paths='/univention/portal/, /univention/umc/, /univention/foo/' Setting portal/paths File: /etc/apache2/sites-available/univention-portal.conf Script: /etc/univention/templates/scripts/symlink_portal Linking /var/www/univention/foo to portal content... File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf # ls /var/www/univention/ foo js languages.json login maintenance management server-overview setup system-info udm umc ^^^ # ucr unset portal/paths Unsetting portal/paths W: portal/paths is still set in scope "default" File: /etc/apache2/sites-available/univention-portal.conf Script: /etc/univention/templates/scripts/symlink_portal File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf # ls /var/www/univention/ foo js languages.json login maintenance management server-overview setup system-info udm umc ^^^ → why is this still here?
The UCR definition is wrong: [portal/paths] … Type=int ^^^
(In reply to Florian Best from comment #14) > The UCR definition is wrong: > > [portal/paths] > … > Type=int > ^^^ Fixed in univention-portal 4.0.5-32A~5.0.0.202104210331 (In reply to Florian Best from comment #13) > I found another error: > > # ucr set portal/paths='/univention/portal/, /univention/umc/, > /univention/foo/' > > Setting portal/paths > > File: /etc/apache2/sites-available/univention-portal.conf > > Script: /etc/univention/templates/scripts/symlink_portal > Linking /var/www/univention/foo to portal content... > File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf > # ls /var/www/univention/ > foo js languages.json login maintenance management server-overview > setup system-info udm umc > ^^^ > # ucr unset portal/paths > Unsetting portal/paths > W: portal/paths is still set in scope "default" > > File: /etc/apache2/sites-available/univention-portal.conf > Script: /etc/univention/templates/scripts/symlink_portal > File: /etc/apache2/ucs-sites.conf.d/univention-portal.conf > # ls /var/www/univention/ > foo js languages.json login maintenance management server-overview > setup system-info udm umc > ^^^ → why is this still here? This was some UCR glitch.
missing changelog entry.
Added in 2d3dda3b9b
OK: functionality (tested some weeks ago) OK: code review: recent changes OK: changelog entry
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".
*** Bug 51798 has been marked as a duplicate of this bug. ***