View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
17180Bug reportsLabel setspublic2021-03-23 12:08
ReporterDenisChenu Assigned Toc_schmitz  
PrioritylowSeverityminor 
Status assignedResolutionfixed 
Product Version4.4.12 
Summary17180: Bad HTML after import bad label set with bad extension or not a valid XML label set
Description

After try to import label set : if file is invalid : HTML is broken

Steps To Reproduce
  1. Go to manage label
  2. Click on create / import
  3. Try to import CSV file
  4. See screen
  5. Try to import lsl (renamed CSV)
  6. See screen
TagsNo tags attached.
Attached Files
limesurvey_labelset_5-tranches-pas_du_tout_enormement.csv (653 bytes)   
# LimeSurvey Label Set Dump
# DBVersion 142
# This is a dumped label set from the LimeSurvey Script
# http://www.limesurvey.org/
# Do not change this header!

#
# LABELSETS TABLE
#
"lid","label_name","languages"
"50","Niveau - 5 tranches","en fr"

#
# LABELS TABLE
#
"lid","code","title","sortorder","language","assessment_value"
"50","1","None","0","en","1"
"50","1","Pas du tout","0","fr","1"
"50","2","Slight","1","en","2"
"50","2","Peu","1","fr","2"
"50","3","Moderate","2","en","3"
"50","3","Moyennement","2","fr","3"
"50","4","High","3","en","4"
"50","4","Très","3","fr","4"
"50","5","Very High","4","en","5"
"50","5","Énormément","4","fr","5"
LimeSurvey.html (14,258 bytes)   
<!DOCTYPE html>
<html lang="fr" dir="ltr"  >
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <!-- Assets load -->

    <!--
        Notice to developers :


        If you turn debug mode on, the asset manager will be off.
        If you turn degug mode off, the asset manager will be on.

        Without the asset manager, the CSS/JS files are published from their real url (eg: http://yourlimesurvey.url/scripts/admin/admin_core.js)
        So, once a browser loaded once those files, it cache it, and don't load it anymore.
        Then, if you change some css/js files, final user must clean its browser cache to get the new version of the cache.
        This was the old LS behaviour, if debug mode is on, you'll have this very behaviour

        The asset manager resolve the browser cache problem. It copy the css/js files to a tmp directory before publishing it:
        http://yourlimesurvey.url/tmp/assets/e929b9d4/admin_core.js

        For admin GUI, the asset manager works on a base of a "file by file" : each single css/js file is published as a single asset.
        So if you touch any css/js file published via the asset (updating its date of modification), the asset manager will AUTOMATICALLY create a new tmp directory:
        http://yourlimesurvey.url/tmp/assets/eb139b88/admin_core.js

        Then, the browser will automatically reload the file, and the final user don't need to refresh its cache.
        You should never have to delete the tmp/assets directory. You can do it to free some space on your server, but that all.

        notice: the css/js files from third party extension use the package system. It means that the asset manager will publish them on the base of the directory logic.
        So, if you update any css/js file from a third party extension, make sure that the modification date of the root directory is updated.
    -->

                <!-- Debug mode is off, so the asset manager will be used-->
    
        <title>LimeSurvey</title>
    <link rel="shortcut icon" href="/master/themes/admin/favicon.ico" type="image/x-icon" />
    <link rel="icon" href="/master/themes/admin/favicon.ico" type="image/x-icon" />
            </head>
<body>
    <div id="beginScripts">
        <###begin###>
    </div>
<!-- Loading wrapper -->
<div id='ls-loading'>
    <span id='ls-loading-spinner' class='fa fa-spinner fa-spin fa-4x'></span>
    <span class='sr-only'>Chargement ...</span>
</div>


<div class='messagebox ui-corner-all'>
<div class="warningheader">Erreur</div><br />
Le nom du fichier de jeu d&#039;étiquettes doit avoir une extension .lsl.<br /><br />
<input type="submit" value="Écran principal d&#039;administration" onclick='window.open("/master/admin/index", "_top")' /><br /><br />
</div>
</div>
<!-- Footer -->
<footer class='footer'>
    <div class="container-fluid">
        <div class="row">
            <!-- Link to manual -->
            <div class="col-xs-6 col-sm-4 ">
                <a href='http://manual.limesurvey.org' onclick='function go(ev) { ev.preventDefault(); var win = window.open("http://manual.limesurvey.org", "_blank"); win.focus(); }; go(event);'>
                    <span class="fa fa-question-circle" id="info-footer"></span>
		    <span class="sr-only">Manuel en ligne de LimeSurvey</span>
                </a>
            </div>

            <!-- Support / Donate -->
            <div  class="col-xs-6 col-sm-4 text-center"  >
                <a href='https://account.limesurvey.org/nbill?action=orders&task=order&cid=27' target="_blank">
                    <img alt='Supportez ce projet - Faites un don à LimeSurvey !' title='Supportez ce projet - Faites un don à LimeSurvey !' src='/master/themes/admin/Sea_Green/images/donate.png'/>
                </a>
            </div>

            <!-- Lime survey website -->
            <div class="col-xs-12 col-sm-4 text-right">
                <a  title='Visitez notre site web !' href='https://www.limesurvey.org' target='_blank'>LimeSurvey</a><br />
                 
                    <a href="#modalSystemInformation" data-toggle="modal" title="Récupérer les informations système"> 
                                Version  4.4.12                                    </a> 
                            </div>
        </div>
    </div>
</footer>
<div id="bottomScripts">
    <###end###>
</div>

<!-- Modal for system information -->

<div id="modalSystemInformation" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="h3 modal-title">Informations système</div>
            </div>
            <div class="modal-body">
                                    <h4>Votre configuration système :</h4>
                    <ul class="list-group">
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Version de LimeSurvey</div>
                                    <div class="col-8">github</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Système d’exploitation</div>
                                    <div class="col-8">Linux poledra.maison.shnoulle.net 5.10.22-200.fc33.x86_64 #1 SMP Tue Mar 9 22:05:08 UTC 2021 x86_64</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Version de PHP</div>
                                    <div class="col-8">7.4.16</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Nom du serveur web</div>
                                    <div class="col-8">limesurvey.local</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Logiciel du serveur web</div>
                                    <div class="col-8">nginx/1.18.0</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Information sur le serveur web</div>
                                    <div class="col-8">HTTP/1.1</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Pilote de la base de données</div>
                                    <div class="col-8">mysql</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Version du connecteur de base de données</div>
                                    <div class="col-8">mysqlnd 7.4.16</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Information sur le serveur de base de données</div>
                                    <div class="col-8">Uptime: 85331  Threads: 7  Questions: 1170  Slow queries: 0  Opens: 82  Flush tables: 1  Open tables: 65  Queries per second avg: 0.013</div>
                                </div>
                            </li>   
                                                    <li class="list-group-item">
                                <div class="ls-flex-row">
                                    <div class="col-4">Version du serveur de base de données</div>
                                    <div class="col-8">5.5.5-10.4.17-MariaDB-log</div>
                                </div>
                            </li>   
                                            </ul>
                            </div>
        </div>
    </div>
</div>

<!-- Modal for confirmation -->
<div id="confirmation-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="h3 modal-title">Confimer</div>
            </div>
            <div class="modal-body">
                <p class='modal-body-text'>Êtes-vous sûr ?</p>
                <!-- the ajax loader -->
                <div id="ajaxContainerLoading" >
                    <p>Veuillez patienter, chargement des données ...</p>
                    <div class="preloader loading">
                        <span class="slice"></span>
                        <span class="slice"></span>
                        <span class="slice"></span>
                        <span class="slice"></span>
                        <span class="slice"></span>
                        <span class="slice"></span>
                    </div>
                </div>

            </div>
            <div class="modal-footer modal-footer-yes-no">
                <a class="btn btn-primary btn-ok"><span class='fa fa-check'></span>&nbsp;Oui</a>
                <button type="button" class="btn btn-danger" data-dismiss="modal"><span class='fa fa-ban'></span>&nbsp;Non</button>
            </div>
            <div class="modal-footer-close modal-footer" style="display: none;">
                <button type="button" class="btn btn-danger" data-dismiss="modal">
                    Fermer                </button>
            </div>
        </div>
    </div>
</div>

<!-- Modal for errors -->
<div id="error-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content panel-danger">
            <div class="modal-header panel-heading">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="h3 modal-title">Erreur</div>
            </div>
            <div class="modal-body">
                <p class='modal-body-text'>Une erreur est survenue.</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">&nbsp;Fermer</button>
            </div>
        </div>
    </div>
</div>

<!-- Modal for success -->
<div id="success-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content panel-success">
            <div class="modal-header panel-heading">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="h3 modal-title">Succès</div>
            </div>
            <div class="modal-body">
                <p class='modal-body-text'></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">&nbsp;Fermer</button>
            </div>
        </div>
    </div>
</div>

<!-- Modal for admin notifications -->
<div id="admin-notification-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">              <div class="modal-header panel-heading">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div class="h3 modal-title">
			<span class="sr-only">Notifications</span>
		</div>
                <span class='notification-date'></span>
            </div>
            <div class="modal-body">
                <p class='modal-body-text'></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">&nbsp;Fermer</button>
            </div>
        </div>
    </div>
</div>

<!-- Yet another general purpose modal, this one used by AjaxHelper to display JsonOutputModal messages -->
<div id="ajax-helper-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
        </div>
    </div>
</div>

<div id="htmleditor-modal" class="modal fade" role="dialog">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header panel-heading">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <div id="htmleditor-modal-title" class="h3 modal-title">Éditeur</div>
            </div>
            <div class="modal-body">
                <textarea id='htmleditor-modal-textarea' name='htmleditor-modal-textarea' rows='5'></textarea>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" id="htmleditor-modal-save">Confimer</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
LimeSurvey.html (14,258 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)4.4.12 github
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant?
Server OS (if known)not relevant ?
Webserver software & version (if known)not relevant ?
PHP Versionnot relevant ?

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2021-03-14 17:01

developer   ~63345

With lsl

limesurvey_labelset_5-tranches-pas_du_tout_enormement.lsl (653 bytes)   
# LimeSurvey Label Set Dump
# DBVersion 142
# This is a dumped label set from the LimeSurvey Script
# http://www.limesurvey.org/
# Do not change this header!

#
# LABELSETS TABLE
#
"lid","label_name","languages"
"50","Niveau - 5 tranches","en fr"

#
# LABELS TABLE
#
"lid","code","title","sortorder","language","assessment_value"
"50","1","None","0","en","1"
"50","1","Pas du tout","0","fr","1"
"50","2","Slight","1","en","2"
"50","2","Peu","1","fr","2"
"50","3","Moderate","2","en","3"
"50","3","Moyennement","2","fr","3"
"50","4","High","3","en","4"
"50","4","Très","3","fr","4"
"50","5","Very High","4","en","5"
"50","5","Énormément","4","fr","5"
import.html (60 bytes)   
This is not a valid LimeSurvey label set structure XML file.
import.html (60 bytes)   
ollehar

ollehar

2021-03-15 09:56

administrator   ~63355

What's a "bad" label set? :)

DenisChenu

DenisChenu

2021-03-15 10:18

developer   ~63357

Updated title

c_schmitz

c_schmitz

2021-03-18 15:28

administrator   ~63430

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=31344

DenisChenu

DenisChenu

2021-03-18 15:36

developer   ~63434

And

  1. Try to import lsl (renamed CSV)
  2. See screen
lime_release_bot

lime_release_bot

2021-03-22 15:27

administrator   ~63536

Fixed in Release 4.4.14+210322

DenisChenu

DenisChenu

2021-03-23 12:07

developer   ~63574

Still the 2nd error : invalid lsl

DenisChenu

DenisChenu

2021-03-23 12:08

developer   ~63575

limesurvey_labelset_5-tranches-pas_du_tout_enormement-2.lsl (653 bytes)   
# LimeSurvey Label Set Dump
# DBVersion 142
# This is a dumped label set from the LimeSurvey Script
# http://www.limesurvey.org/
# Do not change this header!

#
# LABELSETS TABLE
#
"lid","label_name","languages"
"50","Niveau - 5 tranches","en fr"

#
# LABELS TABLE
#
"lid","code","title","sortorder","language","assessment_value"
"50","1","None","0","en","1"
"50","1","Pas du tout","0","fr","1"
"50","2","Slight","1","en","2"
"50","2","Peu","1","fr","2"
"50","3","Moderate","2","en","3"
"50","3","Moyennement","2","fr","3"
"50","4","High","3","en","4"
"50","4","Très","3","fr","4"
"50","5","Very High","4","en","5"
"50","5","Énormément","4","fr","5"

Related Changesets

LimeSurvey: master 6a19c5f6

2021-03-18 16:28

c_schmitz


Details Diff
Fixed issue 17180: Bad HTML page after importing bad label set with invalid extension Affected Issues
17180
mod - application/controllers/admin/labels.php Diff File
mod - application/views/admin/labels/editlabel_view.php Diff File

Issue History

Date Modified Username Field Change
2021-03-14 17:00 DenisChenu New Issue
2021-03-14 17:00 DenisChenu File Added: limesurvey_labelset_5-tranches-pas_du_tout_enormement.csv
2021-03-14 17:00 DenisChenu File Added: LimeSurvey.html
2021-03-14 17:01 DenisChenu Note Added: 63345
2021-03-14 17:01 DenisChenu File Added: limesurvey_labelset_5-tranches-pas_du_tout_enormement.lsl
2021-03-14 17:01 DenisChenu File Added: import.html
2021-03-14 18:58 ollehar Product Version => 4.4.12
2021-03-15 09:56 ollehar Note Added: 63355
2021-03-15 10:09 ollehar Priority none => low
2021-03-15 10:18 DenisChenu Summary Bad HTML after import bad lable set => Bad HTML after import bad label set with bad extension or not a valid XML label set
2021-03-15 10:18 DenisChenu Note Added: 63357
2021-03-18 15:28 c_schmitz Changeset attached => LimeSurvey master 6a19c5f6
2021-03-18 15:28 c_schmitz Note Added: 63430
2021-03-18 15:28 c_schmitz Assigned To => c_schmitz
2021-03-18 15:28 c_schmitz Resolution open => fixed
2021-03-18 15:28 c_schmitz Status new => resolved
2021-03-18 15:36 DenisChenu Note Added: 63434
2021-03-22 15:27 lime_release_bot Note Added: 63536
2021-03-22 15:27 lime_release_bot Status resolved => closed
2021-03-23 12:07 DenisChenu Status closed => assigned
2021-03-23 12:07 DenisChenu Note Added: 63574
2021-03-23 12:08 DenisChenu Note Added: 63575
2021-03-23 12:08 DenisChenu File Added: Capture d’écran_2021-03-23_12-07-28.png
2021-03-23 12:08 DenisChenu File Added: limesurvey_labelset_5-tranches-pas_du_tout_enormement-2.lsl