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

task/CR-1401-extended-themes-before-ls-6-can-cause-issue-with-the-attributes-when-generating-xml-files #3792

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

marticos
Copy link
Contributor

Fixed issue Jira ticket:
https://limesurvey.atlassian.net/browse/CR-1401

This PR fixes an issue discovered during the copying or the exportation of a survey that is using a template with an invalid config file. To reproduce the issue please create a theme with the invalid cssframework node in the config file, like so.

`

        <dropdownoptions>
                <option data-mode="replace" value="css/variations/basic.min.css">Basic Bootstrap</option>
                <option data-mode="replace" value="css/variations/cerulean.min.css">Cerulean</option>
                <!-- ...more options -->
                <option data-mode="replace" value="css/variations/yeti.min.css">Yeti</option>
        </dropdownoptions>
    </cssframework>`

These kind of files will also produce invalid values in the database table template_configuration, specifically the @Attribute value in the option column that will throw an error during the creation of files to be exported.

These changes will scan all the configuration.xml files and the database to fix the values.
This also adds a check whenever an action is being triggered upon a template config file, to check his integrity.

To test the PR, please first reproduce the error by importing a few theme with an invalid config files, then perform the update to version 624 and try to export or copy the surveys that had the invalid data.

@marticos marticos marked this pull request as draft March 18, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant