martialblog/docker-limesurvey

'Unknown "strpos" function.' when previewing survey on v5.3.12-220502

fphammerle opened this issue · 3 comments

Hi,

I get "Twig\Error\SyntaxError: Unknown "strpos" function. " when previewing a newly created survey.

One of LimeSurvey's developers noted: "Seems an issue in docker image"
( https://bugs.limesurvey.org/view.php?id=18105#c69646
archived: https://web.archive.org/web/20220516062947/https://bugs.limesurvey.org/view.php?id=18105 )

Steps to reproduce:

  1. Run container image docker.io/martialblog/limesurvey:5.3.12-220502-apache@sha256:a340f734ae85ccf2b97c58edfe5cdad2087aae2eb6e02cdb867b2b7d05df6118
  2. Create new survey
  3. Click on "Preview survey"

Results in:

Twig\Error\SyntaxError
Unknown "strpos" function.
/var/www/html/themes/survey/vanilla/views/subviews/privacy/privacy_datasecurity_notice_label.twig(10)
{% if( strpos( " " ~ dataSecurityNoticeLabel, '{STARTPOLICYLINK}') == false and strpos( " " ~ dataSecurityNoticeLabel, '{ENDPOLICYLINK}') == false) %}

Full trace: Twig_Error_SyntaxError_2022-05-16T06_22_01.800.html.zip

Any ideas how I could fix or workaround this issue?
Thank you

Hi, I'm unable to recreate the error on a fresh 5.3.12-220502 installation.

Can you maybe provide some more details on how what when where the error occurs?

Sorry! Found the issue (my fault):
I assumed that I can persist the /var/www/html/application/config folder over image upgrades
to keep my setting files (e.g. /var/www/html/application/config/config.php or /var/www/html/application/config/security.php).
Apparently that approach is flawed (incompatible with LimeSurvey's upgrades as they do change /var/www/html/application/config/internal.php)

Thank you!

@fphammerle Thanks for the feedback. Glad you got it sorted out.

Cheers,
Markus