Contact form is not working

I use a simple contact form but if I try to open the page I see only these error below. I reinstall all Backlight Modules (Version 5.4.1), but this not help. What can I do to fix the problem?

Christian

$customPath = ‘/’.‘backlight/custom’; $customStylesheetEnabled = (bool) ‘1’; $customStylesheetFilename = $customStylesheetEnabled ? ‘custom_v3.css’ : ‘’; $phpluginsFilename = ‘phplugins-pangolin-cg01.php’; define(‘TTG_HOOK’, ‘/srv/www/gosslar_homedns_org/htdocs/backlight/custom/phplugins’); define(‘BACKLIGHT_HOOK’, ‘/srv/www/gosslar_homedns_org/htdocs/backlight’); define(‘TTG_COMP’, ‘TTG BACKLIGHT-Pangolin 1.2’ ); define(‘PASSWORD_ENABLED’, isset($enablePassword) && $enablePassword); define(‘LOGGED_IN’, isset($logged_in) && $logged_in); if (TTG_HOOK && $phpluginsFilename && file_exists( TTG_HOOK . ‘/’.$phpluginsFilename)) { require_once TTG_HOOK . ‘/’. ‘phplugins-pangolin-cg01.php’; if (class_exists(‘PHPlugins’)) { $data = array(); if (isset($engine)) { $slug = $engine->getPageIdentifier(); if ($slug) { $data[‘slug’] = $slug; } } if (isset($album)) { $data[‘album’] = $album; if (!isset($data[‘slug’])) { $data[‘slug’] = $album->getSlug(); } } if (isset($photo)) { $data[‘photo’] = $photo; } $data[‘comp’] = TTG_COMP; $data[‘hook’] = TTG_HOOK; $data[‘password_enabled’] = PASSWORD_ENABLED; $data[‘logged_in’] = LOGGED_IN; $phplugins = new PHPlugins($data); } } $void = !isset($phplugins) || $phplugins->dispatch(‘user_load’); $noindex = false || (isset($album) && isset($enablePassword) && $enablePassword); if ($noindex) { echo ‘’; } $childType = ‘content’; $siteUrl = URLHelper::siteURL(); $imageUrl = null; $imageWidth = null; $imageHeight = null; if (isset($photo)) { $imageUrl = $photo->getUrl(‘photos’); list($imageWidth, $imageHeight) = getimagesize($photo->getLocalPath(‘photos’)); } elseif (isset($album) && $album->getPath()) { $webImageHelper = new WebImageHelper(); $webImageHelper->setRenditionPath(‘photos’); $coverImage = $webImageHelper->createCoverImageForAlbum($album); $imageUrl = $coverImage->getAbsoluteUrl(); if ($imageUrl) { $imageWidth = $coverImage->getWidth(); $imageHeight = $coverImage->getHeight(); } } $pageTitle = defined(‘PAGE_TITLE’) ? PAGE_TITLE : ‘’; if (isset($photo)) { $pageTitle = $photo->hasMetadata(Photo::$PHOTO_TITLE) ? $photo->getMetadata(Photo::$PHOTO_TITLE) : $photo->getFilename(); } elseif ((isset($album) && $album->getType() === ‘topLevel’) && defined(‘PAGE_TITLE’)) { $pageTitle = PAGE_TITLE; } elseif (isset($album)) { $pageTitle = $album->getTitle(); } elseif (isset($child)) { $pageTitle = preg_replace(’/’/’, “’”, $child->getTemplate()->getTitle()); } $description = ‘’; if (isset($photo)) { $description = $photo->hasMetadata(Photo::$PHOTO_CAPTION) ? $photo->getMetadata(Photo::$PHOTO_CAPTION) : ‘’; } elseif (isset($album)) { $description = $album->getDescription(); } $description = $description ? preg_replace(’/"/’, ‘"’, $description) : ‘’; $siteName = preg_replace(’/"/’, ‘"’, __c(‘COMPANY_NAME’)); $url = URLHelper::absoluteCurrentPageURL(); // RSS $siteTitle = __c(‘TITLE’); $siteTitle = preg_replace(’/[COMPANY_NAME]/’, __c(‘COMPANY_NAME’), $siteTitle); if ($childType == GenericEngine::$ENGINE_TYPE_ALBUM && isset($album) && __c(‘ALBUM_RSS_ENABLED’) == ‘yes’) { echo “\t”.’’."\n"; } else if (__c(‘SITE_RSS_ENABLED’) == ‘yes’) { echo “\t”.’’."\n"; } if (__c(‘GOOGLE_RECAPTCHA_V3_TERMS_MODE’) == ‘text’) { } /** Hide share commands when crg or protected */ $crg = (bool) ‘’; $protected = isset($enablePassword) && $enablePassword; if (isset($album) && $album instanceof Album && ($crg || $protected)) { echo “\t”.’’."\n"; } if (isset($cssIncludes) && is_array($cssIncludes)) { foreach ($cssIncludes as $cssInclude) { echo “\t”.’’."\n"; } } if ($customStylesheetFilename) { echo “\t”.’’."\n"; } // PHPlugins Insert $void = !isset($phplugins) || $phplugins->dispatch(‘head’); $slug = ‘contact’; $type = ‘page’; if (isset($album) && $album instanceof Album) { if ($album->getType() == ‘album’ || $album->getType() == ‘set’) { $slug = $album->getSlug(); } else if ($album->getType() == ‘topLevel’) { $slug = $album->getTopLevelGalleriesDirectory(); } }

$add_mode = !isset($phplugins) || $phplugins->dispatch(‘header_top’); if ( $add_mode ) { } // ttg_header_top $void = !isset($phplugins) || $phplugins->dispatch(‘header_bottom’);
$void = !isset($phplugins) || $phplugins->dispatch(‘main_top’); // Password if (isset($album) && (!isset($enablePassword) || $enablePassword) && !$logged_in) { if ($enablePasswordForProtectedPhotos) {
// PHPlugins Replace $add_mode = !isset($phplugins) || $phplugins->dispatch(‘copy_top’); if ( $add_mode ) { Call to undefined function mb_strlen()|#0 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/lib/Parsedown.php(43): Parsedown->lines() #1 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/lib/Markdown.php(25): Parsedown->text() #2 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/ModelSetting.php(64): Markdown::text() #3 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/models/FormDataModel.php(273): ModelSetting->getValue() #4 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-pages/dynamic/view/content.php(28): FormDataModel->value() #5 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(523): include(’/srv/www/gossla…’) #6 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(497): GenericEngine->renderSubview() #7 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(798): GenericEngine->render() #8 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/pangolin-page/fragments/body/main.php(31): GenericEngine->renderChild() #9 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(818): include(’/srv/www/gossla…’) #10 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(1019): GenericEngine->includeFragmentFile() #11 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/pangolin-page/fragments/body.php(57): GenericEngine->includeFragment() #12 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(818): include(’/srv/www/gossla…’) #13 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(1019): GenericEngine->includeFragmentFile() #14 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/pangolin-page/dynamic/view/page.php(19): GenericEngine->includeFragment() #15 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/models/GenericEngine.php(588): include(’/srv/www/gossla…’) #16 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-designer/application/controllers/PageController.php(232): GenericEngine->renderView() #17 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/controllers/Controller.php(58): PageController->view() #18 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/models/Dispatchable.php(136): Controller->dispatch() #19 /srv/www/gosslar_homedns_org/htdocs/backlight/modules/module-framework/Framework.php(78): Dispatchable->dispatch() #20 /srv/www/gosslar_homedns_org/htdocs/index.php(38): Framework->route() #21 {main}|URL: /index.php

try assigning another page template to the page containing the contact form.

Posting a link to the contact page may also help with dignosis

Ich I change the template to link e.g. to about this is working without problems. I have set it back, link to the page is <thp>echo NameHelper::formatPageTitle("PAGE_TITLE - COMPANY_NAME");</thp>

@Ben will have to take a look, but it seems to me that the page template governing the Contact page may be corrupt. Is it a different page template than you’re using for the About page?
If so, I would try assigning the page template used for About to the Contact page.

I create a new contac page with a different page template and this is working. And if I change back to the first template it’s still working. Thanks for help!
Shall you will analyse the corrupt page or can I delete it?

I’d just delete it, unless you want @Ben (one of the developers) to take a look.

Hi @cg-berlin, this is caused by the Parsedown library trying to call a PHP function that your server doesn’t have (mb_strlen).

Can you check your PHP configuration in your host’s control panel and see if there are any available PHP modules named something like mbstring? If so, try enabling it.

Once enabled, there should be a section like the following visible in PHP Info (available from Admin > Special Links in the Backlight admin page):

If you’re unable to add the module in your control panel, then see if there are other PHP versions that you can set your site to use. It’s likely that this is broken in the host’s installation of one version of PHP but not another.

Thanks for the tip, the php module php-mbstring was not on the Server (it’s not in the php default config), I add these and now also the old contact side runs also.
Thanks for fast support!

1 Like