ctsit / imagemap

Imagemap REDCap external module
Other
14 stars 27 forks source link

IMAGEMAP Question missing in XML file/Not able to collect data for IMAGEMAP questions on a project #67

Open siqi-zheng opened 1 year ago

siqi-zheng commented 1 year ago

We encountered an interesting problem on REDCap 13.1.10 · PHP 8.1.16 (Linux/Unix OS) · MariaDB 10.4.27. Data are not saved for the IMAGEMAP questions on a particular project created long time ago (using public survey link or add/edit records) but IMAGEMAP works on other newly created projects. I copied the old project on REDCap interface, and the copied one has the same problem. However, when I created a new project by uploading the XML file of this project, the question using IMAGEMAP simply disappears. I discovered the XML file simply does not contain this IMAGEMAP question. The only possible way to avoid this problem is to create a new project from scratch. Rob Taylor suggested that we should contact you since this looks like it mostly involves the IMAGEMAP external module, it does not appear to be a REDCap bug but probably a bug caused by the IMAGEMAP EM.

We have no idea what causes this failure and acknowledge that a brand new project would not have this problem. More discussion on the REDCap community website can be found here: https://community.projectredcap.org/questions/142889/questions-missing-in-a-new-project-created-by-xml.html and here: https://community.projectredcap.org/questions/142886/imagemap-not-working-on-certain-projects-project-x.html?childToView=142904#comment-142904

pbchase commented 1 year ago

The REDCap Comunity articles linked here have moved to https://redcap.vanderbilt.edu/community/post.php?id=142889 and https://redcap.vanderbilt.edu/community/post.php?id=142886

Gunther Rezniczek seems to understand the bug:

gunther.rezniczek commented • 6 months, 1 week ago (2023-02-24 05:03) @tim.zheng (and @andy.martin fyi) - Your field type is checkbox (without any options!). Either use a textbox type field for image map, or add all possible codes fXX, bXX to the checkbox field. This also explains why your clicks weren't saved.

Apparently, the XML export drops any checkbox fields that have no choices set. This still happens in 13.3.2 and could/should be considered a bug @rob.taylor

Andy Martin concedes his point:

1 · · andy.martin avatar image andy.martin commented • 6 months, 1 week ago (2023-02-24 13:05)

We should probably improve the EM to automatically suggest the options when you add an imagemap tag to the online designer... another ticket in the backlog.