View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
19618Bug reportsConditionspublic2024-06-19 15:05
ReporterFabianLucas Assigned ToDenisChenu  
PrioritynoneSeverityblock 
Status closedResolutionno change required 
Product Version6.5.x 
Summary19618: A condition does not longer work because there is a javascript error somewhere and code does not get executed
Description

Hey,

we have a project that uses simple expressions like the question before must be answered with 1 or 2. However, even choosing the Vanilla LS Theme, the filtering does not work. I opened up the browser console and saw that there is a syntax error:

Error:

Uncaught SyntaxError: Unexpected token '<' (at 985146:1979:1)

The code with the error seems to be:

jQuery(document).off('pjax:scriptcomplete.mainBottom').on('ready pjax:scriptcomplete.mainBottom', function() {
<script type="text/javascript"> <---here the browser sees the error
$(document).ready(function() {
// Formular-Submit-Event
$('#limesurvey').submit(function(event) {
var andereWelche = $('#andere-welche').val().trim();
if (andereWelche === '') {
alert('Bitte füllen Sie das Feld "Andere, welche:" aus.');
event.preventDefault(); // Verhindert das Absenden des Formulars
}
});
});
</script>

TagsNo tags attached.
Attached Files
Bug heat6
Complete LimeSurvey version number (& build)LimeSurvey Cloud Version 6.5.13
I will donate to the project if issue is resolvedNo
BrowserEdge
Database type & versionCloud - No idea
Server OS (if known)
Webserver software & version (if known)
PHP VersionCloud - No idea

Users monitoring this issue

FabianLucas

Activities

DenisChenu

DenisChenu

2024-06-19 11:42

developer   ~80392

For us to be able to investigate this issue please attach a 2 question sample survey demonstrating the issue, either as .lss file (survey structure) or (even better) as .lsa file (survey archive).

Just attach it to this issue and we will have a look.
Thank you!

var andereWelche = $('#andere-welche').val().trim(); clearly dind't come from LimeSurvey
Review your script

FabianLucas

FabianLucas

2024-06-19 13:28

reporter   ~80396

ha - i found the problem. there was some custom js in the question, that came from somewhere..

DenisChenu

DenisChenu

2024-06-19 15:05

developer   ~80397

Don't add <script> in dedicated script attribute …

Issue History

Date Modified Username Field Change
2024-06-19 11:32 FabianLucas New Issue
2024-06-19 11:32 FabianLucas File Added: Screenshot 2024-06-19 112916.png
2024-06-19 11:32 FabianLucas File Added: Screenshot 2024-06-19 113018.png
2024-06-19 11:32 FabianLucas File Added: Screenshot 2024-06-19 113335.png
2024-06-19 11:36 FabianLucas Issue Monitored: FabianLucas
2024-06-19 11:36 FabianLucas Bug heat 0 => 2
2024-06-19 11:42 DenisChenu Note Added: 80392
2024-06-19 11:42 DenisChenu Bug heat 2 => 4
2024-06-19 11:43 DenisChenu Assigned To => DenisChenu
2024-06-19 11:43 DenisChenu Status new => feedback
2024-06-19 13:28 FabianLucas Note Added: 80396
2024-06-19 13:28 FabianLucas Bug heat 4 => 6
2024-06-19 13:28 FabianLucas Status feedback => assigned
2024-06-19 15:05 DenisChenu Note Added: 80397
2024-06-19 15:05 DenisChenu Status assigned => closed
2024-06-19 15:05 DenisChenu Resolution open => no change required