2.3.5 Contact Form Error Info (Bugs)

by Magma, Monday, February 22, 2016, 21:35 (639 days ago)

I'm using 2.3.5 and if you click submit on the contact form without putting in a subject or message you get an error

Error!

  • Array
  • Array

on the MLF form you get

Error!

  • No subject has been entered
  • No message has been entered

the same goes for registered or un-registered users.

Avatar

2.3.5 Contact Form Error Info

by Milo ⌂, Monday, February 22, 2016, 22:51 (639 days ago) @ Magma

Hi,

I'm using 2.3.5 and if you click submit on the contact form without putting in a subject or message you get an error

The contact form was not edited in the RC 2.3.5?! But I can reproduce your error on my own installation but I cannot fix it so far. There is a multiple use of the key-word e.g. error_no_text. This key-word can be found in [general] as well as in [contact] section of the lang-files. The values for both keys are loaded by smarty, Thus, there are two entries instead of one for the same key, which results in the "Array" output:

$smarty.config.$error[0] --> No "message" tex't has been entered
$smarty.config.$error[1] --> No message enetered

(By the way: There a two spelling error)

Restrict this line

{config_load file=$language_file section="contact"}

the loaded section, Alex? What's happens with prior loaded sections? Maybe $config_overwrite is not true?!?

regards
Micha

--
Surveyor-Software: Geodetic Network Adjustment & Deformation-Analysis and Transformation

Avatar

2.3.5 Contact Form Error Info

by Milo ⌂, Saturday, February 27, 2016, 08:52 (635 days ago) @ Milo
edited by Milo, Saturday, February 27, 2016, 09:04

Hi,

Maybe $config_overwrite is not true?!?

Okay, I found the reason. In index.php, the configuration for smarty is given. In line 42:

$smarty->config_overwrite = false;

is setted. Thus, Alex overwrite the default settings to use e.g. array-values (in another context).

From the manual:
If a particular section is loaded, then the global variables and the variables from that section are also loaded. If a variable exists both as a global and in a section, the section variable is used. If you name two variables the same within a section, the last one will be used unless $config_overwrite is disabled.

One solution is to rename the keys in the lang-file to avoid conflicts but maybe there is a better solution...

/Micha

--
Surveyor-Software: Geodetic Network Adjustment & Deformation-Analysis and Transformation

Avatar

2.3.5 Contact Form Error Info

by Auge ⌂ @, Friday, August 12, 2016, 17:40 (467 days ago) @ Milo

Hello

$smarty->config_overwrite = false;

From the manual:
If a particular section is loaded, then the global variables and the variables from that section are also loaded. If a variable exists both as a global and in a section, the section variable is used. If you name two variables the same within a section, the last one will be used unless $config_overwrite is disabled.

Ok.

One solution is to rename the keys in the lang-file to avoid conflicts but maybe there is a better solution...

Now I know, why I had the same issue, when I built the list-of-my-own-postings-function. There I renamed the key for the new strings. This should also be the simplest but not very elegant solution in this case.

Tschö, Auge

--
further development of mlf1

Avatar

2.3.5 Contact Form Error Info

by Milo ⌂, Friday, August 12, 2016, 19:48 (467 days ago) @ Auge

Hi,

Now I know, why I had the same issue,...

The question is: Why the problem is not existing here, in Alex's forum?

/Micha

--
Surveyor-Software: Geodetic Network Adjustment & Deformation-Analysis and Transformation

Avatar

2.3.5 Contact Form Error Info

by Auge ⌂ @, Friday, August 12, 2016, 20:08 (467 days ago) @ Milo

Hello,

Now I know, why I had the same issue,...


The question is: Why the problem is not existing here, in Alex's forum?

I disagree sire [1]! I can reproduce the bug in this, Alex's forum. Follow this link to the contact form and push the send-button without writing a message (and a subject). You will see this (the text depends from the language setting):

[image]

Tschö, Auge

[1]: Is there someone out there who played "Civilization 2"? ;-)

--
further development of mlf1

Avatar

2.3.5 Contact Form Error Info

by Milo ⌂, Friday, August 12, 2016, 20:31 (467 days ago) @ Auge

Hi,

I disagree sire [1]! I can reproduce the bug in this, Alex's forum.

I'm sorry: It worked fine, before Alex was updated to version 2.3.5 but I don't change the code. Maybe the reason is the update to the current smarty version?!

[1]: Is there someone out there who played "Civilization 2"? ;-)

No, the first version was my cup of tea. :-P

/Micha

--
Surveyor-Software: Geodetic Network Adjustment & Deformation-Analysis and Transformation

RSS Feed of thread
powered by my little forum