2.3.5 Contact Form Error Info (Bugs)

by Magma, Monday, February 22, 2016, 21:35 (2983 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 Micha ⌂, Monday, February 22, 2016, 22:51 (2983 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

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

2.3.5 Contact Form Error Info

by Micha ⌂, Saturday, February 27, 2016, 08:52 (2979 days ago) @ Micha
edited by Micha, 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

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

2.3.5 Contact Form Error Info

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

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

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

2.3.5 Contact Form Error Info

by Micha ⌂, Friday, August 12, 2016, 19:48 (2811 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

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

Avatar

2.3.5 Contact Form Error Info

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

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"? ;-)

--
Trenne niemals Müll, denn er hat nur eine Silbe!

Avatar

2.3.5 Contact Form Error Info

by Micha ⌂, Friday, August 12, 2016, 20:31 (2811 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

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

RSS Feed of thread