Macros not resolving in widgets after applying hotfix v12.0.98 (Portal Engine)

SOS Childrensvillages asked on April 27, 2022 10:55

Hi,

I have been using macros in widgets without any problems up until recently. The same macros still work in the form tab/web parts and in the benchmark tool in the System Module.

I have been resolving macros successfully up until now using EnableViewState = (ControlsHelper.ResolveDynamicControls(this));

I resigned old and new. Pre existing macros that were resolved/signed in widgets before the upgrade still work. We haven't changed our salt in web.config as the issue is only occurring in widgets. Even when it's the same webpart/widget.

Instead, I just get something like this in static html as a widget {% SOS.EditorTextAreaWidth() |(user)admin-rah|(hash)a71f5cbaea85e4b39c7a4b698163072db04a81d3191c51899116346f8c8db5f2%}

As I said, the same macro resolves successfully when I create it in static html as a web part.

Correct Answer

Juraj Ondrus answered on April 27, 2022 13:52

What was the initial version and where and how are the macros entered? You should be able to use macros in widget properties. The ResolveDynamicControls method should be used to resolve inline controls - inline widgets entered e.g. to editable area. To resolve macros in the API you should be using this.

0 votesVote for this answer Unmark Correct answer

Recent Answers


SOS Childrensvillages answered on April 29, 2022 12:32

Thanks Juraj, the initial version was 12.0.65. The macros were inserted to the static html text area via the ckeditor. Like I said, calling ltlText.EnableViewState = (ControlsHelper.ResolveDynamicControls(this)); in the code behind was working for widgets (and still works when it's a webpart) up until the upgrade to v12.0.98. I can solve the issue now by calling ltlText.Text = MacroResolver.Resolve(Text);, it just means now I have to apply the fix to pretty much all my widgets.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.