Search code examples
modulesitecoresitecore7

Sitecore DMS Poll Module with Sitecore 7 issue


We have installed the Sitecore DMS poll module with Sitecore 7 (https://marketplace.sitecore.net/en/Modules/Poll_Module.aspx) and it seems to work fine. The only issue we are having is, if you submit the poll without choosing any of the options, we get the following error: "Poll module error: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)." Anyone has experienced this before?

I am aware that Sitecore 7 is not mentioned as one of the supported versions in the module, but it does seem to work ok other than this issue.

Thank you!


Solution

  • Finally spotted the issue. Looks like in the JavaScript file Poll.js, in function DMSPoll.RaiseCallBack, value of variable checkedOptionId is compared against empty string but the value returned when no option is selected is undefined.

    So I had to change the line from: if (checkedOptionId != "") to if (checkedOptionId != "" && typeof checkedOptionId != 'undefined').

    Hope it saves someone else some time!