30 Posts
phil03
8 years ago
Topic

Hi,

By testing Seblod version 3.8.3  and Joomla 3.5.1   I found a malfunction.
All my forms that contained a test user ID field filled dynamically no longer worked.
After checking I located the problem with the file \ plugins \ cck_field_live \ joomla_user \ joomla_user.php

When selected the User id field the variable returned is of the type 'integer'.

if ( is_array( $live ) ) {
if ( $excluded != '' ) {
$excluded = explode( ',', $excluded );
$live = array_diff( $live, $excluded );
}
if ( empty( $live ) ) {
$live = $default;
} else {
$live = implode( ',', $live );
}
} elseif ( $live == '' ) {
$live = $default;
}

In the loop elseif ( $live == '' ) line 82 this causes an error of choice.

We must therefore change the test elseif ( $live === '' ) and then everything is ok.

I hope this helps you.

Get a VIP membership
4229 Posts
Kadministrator
8 years ago
1
Level 1

Hi,

what do you mean by "not working properly" ? I just tested and it works fine, only potential problem I found is that 0 is replaced by '' (empty string) if there is no default value, but you can solve that by setting 0 as default for id

30 Posts
phil03
8 years ago
0
Level 2

Hi Klas,
Thank you for answering
On my form when I put the value 0 by default, the behavior of the form has not changed since a year, is incorrect.
If a user logs, User Id shows me the default value (0) in the field.
On my other review site with version 3.7 I have no problem even without a default value.

Thank's

4229 Posts
Kadministrator
8 years ago
0
Level 1

Having live value user and id as property works fine here, tested on 2 different seblod versions

30 Posts
phil03
8 years ago
0
Level 1

Hi Klas,

As you assured me that it was working.I took the problem to zero,

 I created a form with only UserID.The problem persisted.

So I extract my evaluation sites and operational data from the Joomla extension table. I did a comparison by extracting the names and version manifest_cache field.
I realized that many programs _cck had this field to false or misinformed.
So I restarted the third time updating SEBLOD 3.8.3.
On the remote server or MySQL version 5.5.46+ the manifest_ hide fields have been correctly filled and actually found UserID to normal operation.
At the local it was more complicated with errors due to the use of ALTER UNIQUE in SQL queries but I got there and everything is back in order.
I modified accordingly all forms to be zero by default without user logged.

Tthank 's

Get a VIP membership