Author Topic: Odd "help for" text on MPForm  (Read 376 times)

Offline tobyw7

  • Posts: 52
  • Gender: Male
    • Toby White
Odd "help for" text on MPForm
« on: May 28, 2018, 04:47:31 PM »
Just checked the form and looks like it's showing some helper text placemarker but can't see where it's getting it from. Checked page source and table header is "mpform_help". Any idea?


Offline Martin Hecht

  • Betatester
  • **
  • Posts: 532
  • Gender: Male
    • meine Homepage
Re: Odd "help for" text on MPForm
« Reply #1 on: May 30, 2018, 11:52:55 AM »
In the genaral settings, in the group "layout" you can define the loop that creates the fields.

There, you can add place holders {HELP} or {HELPTXT}. Those are also discussed in the section "help users" of the documentation. When the form is rendered, these place holders are replaced by the content of the "help" box for each field.

It looks as if you have the literal text "help for" in your field loop, or you have {HELPTXT} in the loop and for each field your help consists of these two words.

Is this an up-to date version of mpform? prior to 1.1.10 I think there was a bug in this area...

Offline tobyw7

  • Posts: 52
  • Gender: Male
    • Toby White
Re: Odd "help for" text on MPForm
« Reply #2 on: May 31, 2018, 07:05:47 PM »
In the genaral settings, in the group "layout" you can define the loop that creates the fields.

There, you can add place holders {HELP} or {HELPTXT}. Those are also discussed in the section "help users" of the documentation. When the form is rendered, these place holders are replaced by the content of the "help" box for each field.

It looks as if you have the literal text "help for" in your field loop, or you have {HELPTXT} in the loop and for each field your help consists of these two words.

Is this an up-to date version of mpform? prior to 1.1.10 I think there was a bug in this area...

Thank you! This was correct, the "help for" text was typed in on the Layout section. I just upgraded to the latest version 1.3.21 from an older version thinking that it might sort this but it didn't do anything.

I had recently updated to WB 2.11.0 from 2.10. and I think the problem started after this update.

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 532
  • Gender: Male
    • meine Homepage
Re: Odd "help for" text on MPForm
« Reply #3 on: June 01, 2018, 12:28:56 PM »
I had recently updated to WB 2.11.0 from 2.10. and I think the problem started after this update.

the text "help for" actually comes from the language file of WebsiteBaker. By default, the place holder "{HELP}" should have been in the template for the field loop.

One would have to check the upgrade script of WB if it does some global replacements in the database during update. I know there have been a few changes in the area of the language files, so it's not completely impossible that the upgrade has messed this up. But to be sure, one would have to inspect the upgrade script in detail.

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4110
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Odd "help for" text on MPForm
« Reply #4 on: June 01, 2018, 12:56:06 PM »
I check it, tks
Dietmar
Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline hgs

  • Betatester
  • **
  • Posts: 856
    • EFG MG
Re: Odd "help for" text on MPForm
« Reply #5 on: June 01, 2018, 01:21:57 PM »
Kann den Fehler mit der aktuellen Version von WB 2.12
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=04A499A4
und mpForm 1.3.22
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0A702411
nicht nachvollziehen, der Text "Help for" erscheint bei mir nicht.
Gerne überprüfe ich es mit deinem Template, bitte den Zip File vom Template hier anhängen.

Google Translate:
May be the error with the current version of WB 2.12
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=04A499A4
and mpForm 1.3.22
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=0A702411
do not understand, the text "Help for" does not appear with me.
I like to check it with your template, please attach the zip file from the template here.
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline Martin Hecht

  • Betatester
  • **
  • Posts: 532
  • Gender: Male
    • meine Homepage
Re: Odd "help for" text on MPForm
« Reply #6 on: June 04, 2018, 11:06:43 AM »
I have found the root cause for this "help for" string:

mpForm prior to 1.3.9 did contain this string in the language files, but that string was used nowhere (maybe it was in the past, but at least last year it was not used anymore).

However, in WB 2.10 the way how language variables were loaded and how replacements are performed in the templates has changed, and at this point a definition of a translation entry $LANG['backend']['HELP'] started to cause problems when a placeholder '{HELP}' was used. In earlier versions values were replaced only once, but starting with 2.10 in the resulting string another round of replacements is performed.

So, if you have
- upgraded to WB 2.10 or newer
- and you did not upgrade mpform to 1.3.9 or newer in this course
- and you have modified the general settings in some way, or at least saved them again
then, the place holder '{HELP}' inside the field loop was replaced by mistake

Sorry, I was on the wrong path when I wrote that the string would come from the global WB language file because the problematic entry wasn't there anymore, and mpform uses $MENU['HELP'] in some places.

Edit: corrected a grammar mistake in the post