View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
20718Bug reportsAssetspublic2026-11-01 20:50
Reporterzufolo441 Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status closedResolutionunable to reproduce 
Product Version7.2.x 
Summary20718: error trying to update to 7.2
Description

Call to undefined function getHtmlLangAttributeValue()

/var/www/limesurvey7/application/core/LSETwigViewRenderer.php(690)

678 // (in the future, should be template dependant done via XML file)
679 $aData["aSurveyInfo"] = array_merge($aData["aSurveyInfo"], $oTemplate->getClassAndAttributes());
680
681 $languagecode = App()->getLanguage();
682 if (!empty($aData['aSurveyInfo']['sid']) && Survey::model()->findByPk($aData['aSurveyInfo']['sid'])) {
683 if (!in_array($languagecode, Survey::model()->findByPk($aData['aSurveyInfo']['sid'])->getAllLanguages())) {
684 $languagecode = Survey::model()->findByPk($aData['aSurveyInfo']['sid'])->language;
685 }
686 }
687
688 $aData["aSurveyInfo"]['languagecode'] = $languagecode;
689 / Separate from 'languagecode' since some codes (e.g. 'nl-informal') are not valid values for the HTML lang attribute /
690 $aData["aSurveyInfo"]['htmllanguagecode'] = getHtmlLangAttributeValue($languagecode);
691 $aData["aSurveyInfo"]['dir'] = (getLanguageRTL($languagecode)) ? "rtl" : "ltr";
692
693 if (!empty($aData['aSurveyInfo']['sid'])) {
694 $showxquestions = App()->getConfig('showxquestions');
695 $aData["aSurveyInfo"]['bShowxquestions'] = ($showxquestions == 'show' ||
696 ($showxquestions == 'choose' && !isset($aData['aSurveyInfo']['showxquestions'])) ||
697 ($showxquestions == 'choose' && $aData['aSurveyInfo']['showxquestions'] == 'Y'));
698
699
700 // NB: Session is flushed at submit, so sid is not defined here.
701 if (
702 isset($SESSION['responses' . $aData['aSurveyInfo']['sid']]) &&

Steps To Reproduce

update from 7.1.2 to 7.2.0.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)7.2.0
I will donate to the project if issue is resolvedNo
BrowserFirefox 156
Database type & versionPostgreSQL 18
Server OS (if known)RedHat
Webserver software & version (if known)Nginx
PHP Version8.2
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2026-09-22 08:31

developer   ~85918

Before the update? During the update?

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/surveytranslator_helper.php#L1375

Can you set debug=2 and send the whole HTML? We don't have the previous function here.

zufolo441

zufolo441

2026-09-23 08:28

reporter   ~85936

With 7.3.0 I obtain
Error

Call to undefined function getHtmlLangAttributeValue()

/var/www/limesurvey7/application/views/layouts/header.php(10)

01 <?php
02
03 /*
04
Header of the application
05 Called from renderWrappedTemplate
06
/
07
08 ?>
09 <!DOCTYPE html>
10 <html lang="<?php echo htmlspecialchars(getHtmlLangAttributeValue((string) $adminlang)); ?>"<?php echo $languageRTL;?> >
11 <head>
12 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
13 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
14
15 <!-- Assets load -->
16
17 <!--
18 Notice to developers :
19
20
21 If you turn debug mode on, the asset manager will be off.
22 If you turn degug mode off, the asset manager will be on.

in /index.php/surveyAdministration/listsurveys
or

/var/www/limesurvey7/application/core/LSETwigViewRenderer.php(690)

678 // (in the future, should be template dependant done via XML file)
679 $aData["aSurveyInfo"] = array_merge($aData["aSurveyInfo"], $oTemplate->getClassAndAttributes());
680
681 $languagecode = App()->getLanguage();
682 if (!empty($aData['aSurveyInfo']['sid']) && Survey::model()->findByPk($aData['aSurveyInfo']['sid'])) {
683 if (!in_array($languagecode, Survey::model()->findByPk($aData['aSurveyInfo']['sid'])->getAllLanguages())) {
684 $languagecode = Survey::model()->findByPk($aData['aSurveyInfo']['sid'])->language;
685 }
686 }
687
688 $aData["aSurveyInfo"]['languagecode'] = $languagecode;
689 / Separate from 'languagecode' since some codes (e.g. 'nl-informal') are not valid values for the HTML lang attribute /
690 $aData["aSurveyInfo"]['htmllanguagecode'] = getHtmlLangAttributeValue($languagecode);
691 $aData["aSurveyInfo"]['dir'] = (getLanguageRTL($languagecode)) ? "rtl" : "ltr";
692
693 if (!empty($aData['aSurveyInfo']['sid'])) {
694 $showxquestions = App()->getConfig('showxquestions');
695 $aData["aSurveyInfo"]['bShowxquestions'] = ($showxquestions == 'show' ||
696 ($showxquestions == 'choose' && !isset($aData['aSurveyInfo']['showxquestions'])) ||
697 ($showxquestions == 'choose' && $aData['aSurveyInfo']['showxquestions'] == 'Y'));
698
699
700 // NB: Session is flushed at submit, so sid is not defined here.
701 if (
702 isset($SESSION['responses' . $aData['aSurveyInfo']['sid']]) &&

in index.php.

c_schmitz

c_schmitz

2026-09-23 10:21

administrator   ~85937

The missing function getHtmlLangAttributeValue is in the file
application/helpers/surveytranslator_helper.php

Please check if it is in there. If not then you did not properly update/replace all files in the server.

zufolo441

zufolo441

2026-09-23 10:39

reporter   ~85938

Thank you for this info. I found the problem and I solved it. have a nice day!

Issue History

Date Modified Username Field Change
2026-09-22 08:20 zufolo441 New Issue
2026-09-22 08:31 DenisChenu Note Added: 85918
2026-09-22 08:31 DenisChenu Bug heat 0 => 2
2026-09-22 10:13 c_schmitz Assigned To => c_schmitz
2026-09-22 10:13 c_schmitz Status new => feedback
2026-09-23 08:28 zufolo441 Note Added: 85936
2026-09-23 08:28 zufolo441 Bug heat 2 => 4
2026-09-23 08:28 zufolo441 Status feedback => assigned
2026-09-23 10:21 c_schmitz Note Added: 85937
2026-09-23 10:21 c_schmitz Bug heat 4 => 6
2026-09-23 10:21 c_schmitz Status assigned => feedback
2026-09-23 10:39 zufolo441 Note Added: 85938
2026-09-23 10:39 zufolo441 Status feedback => assigned
2026-11-01 20:50 c_schmitz Status assigned => closed
2026-11-01 20:50 c_schmitz Resolution open => unable to reproduce