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

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

Closed
fphammerle opened this issue May 16, 2022 · 3 comments
Closed

Comments

@fphammerle
Copy link

fphammerle commented May 16, 2022

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

@martialblog
Copy link
Owner

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?

@fphammerle
Copy link
Author

fphammerle commented May 17, 2022

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!

@martialblog
Copy link
Owner

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

Cheers,
Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants