Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Personalization resolves tokens when editing a portlet in the UX (but shouldn't) #2479

Open
cbeach47 opened this issue Mar 11, 2022 · 1 comment

Comments

@cbeach47
Copy link
Contributor

Describe the bug
When editing a portlet in the UX that contains personalization tokens, uPortal resolves the tokens instead of displaying the tokens for editing.

To Reproduce
Steps to reproduce the behavior:

  1. Enable personalization in uportal.properties:
org.apereo.portal.utils.web.PersonalizationFilter.enable=true
org.apereo.portal.utils.personalize.PersonalizerImpl.prefix=beachy.
org.apereo.portal.utils.personalize.PersonalizerImpl.pattern=@up@(.*?)@up@
  1. Import the following as a portlet definition:
<portlet-definition xmlns="https://source.jasig.org/schemas/uportal/io/portlet-definition" xmlns:ns2="https://source.jasig.org/schemas/uportal" xmlns:ns3="https://source.jasig.org/schemas/uportal/io/stylesheet-descriptor" xmlns:ns4="https://source.jasig.org/schemas/uportal/io/permission-owner" xmlns:ns5="https://source.jasig.org/schemas/uportal/io/subscribed-fragment" xmlns:ns6="https://source.jasig.org/schemas/uportal/io/event-aggregation" xmlns:ns7="https://source.jasig.org/schemas/uportal/io/user" xmlns:ns8="https://source.jasig.org/schemas/uportal/io/portlet-type" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0" xsi:schemaLocation="https://source.jasig.org/schemas/uportal/io/portlet-definition https://source.jasig.org/schemas/uportal/io/portlet-definition/portlet-definition-4.0.xsd">
    <title>Beachy Personalization Test in portlet-prefs  - @[email protected]@up@</title>
    <name>personalization-test-portlet-prefs</name>
    <fname>personalization-test-portlet-prefs</fname>
    <desc>A portlet to test personalization in prefs - @[email protected]@up@</desc>
    <type>Advanced CMS</type>
    <timeout>5000</timeout>
    <portlet-descriptor>
        <ns2:webAppName>/SimpleContentPortlet</ns2:webAppName>
        <ns2:portletName>cms</ns2:portletName>
    </portlet-descriptor>
    <group>Authenticated Users</group>
	<parameter>
        <name>blockImpersonation</name>
        <value>false</value>
    </parameter>
    <parameter>
        <name>chromeStyle</name>
        <value>no-chrome</value>
    </parameter>
    <parameter>
        <name>disableDynamicTitle</name>
        <value>true</value>
    </parameter>
    <parameter>
        <name>editable</name>
        <value>false</value>
    </parameter>
    <parameter>
        <name>hasAbout</name>
        <value>false</value>
    </parameter>
    <parameter>
        <name>hasHelp</name>
        <value>false</value>
    </parameter>
    <parameter>
        <name>hideFromMobile</name>
        <value>false</value>
    </parameter>
    <portlet-preference>
        <name>content</name>
        <readOnly>false</readOnly>
        <value>
            <![CDATA[
                <h2>Personalization Test</h2>
                <h4>@[email protected]@up@</h4>
            ]]>
        </value>
    </portlet-preference>
</portlet-definition>
  1. Login to the portal
  2. Navigate to Portal Administration, find the portlet, and click the edit icon.
  3. Note the title and description are personalized (should not be)
  4. Click Save and Configure
  5. Note the content is personalized (should not be)

Expected behavior
Personalization should be disabled for editing portlets.

Screenshots
image

image

It should be something like:

image

Platform:

  • uPortal Version: [5.11.1-SNAPSHOT]
@jgribonvald
Copy link
Contributor

+1 It's actually an annoying problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants