Welcome, Guest
Username Password: Remember me

[Patch 20120824] Multiple fields d'ont work properly (Now AND, OR, NOT, EMPTY, ALL in searchform possible)
(1 viewing) (1) Guest

TOPIC: [Patch 20120824] Multiple fields d'ont work properly (Now AND, OR, NOT, EMPTY, ALL in searchform possible)

Re: Multiple fields d'ont work properly 1 year, 2 months ago #16

  • zaliyanna
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
oh merci

ce fonctionnement est plus flexible et très utile
et ton explication est très claire et bien illustrée.

il y a juste une erreur
Fatal error: Class 'JCckPluginField' not found in ..../plugins/cck_field/select_dynamic/select_dynamic.php on line 16

bon je suis sur la seblod 2.1.0 j'upgrade avant


merci encore @Castor
Last Edit: 1 year, 2 months ago by zaliyanna.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #17

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
il y a juste une erreur
Fatal error: Class 'JCckPluginField' not found in ..../plugins/cck_field/select_dynamic/select_dynamic.php on line 16


Attention! Le patch est pour SEBLOD 2.2.0

L'objet JCckPluginField exist depuis cette version! Pour cette raison, il y a le fichier
/libraries/cms/cck/plugin/field.php dans le patch.
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 11 months ago by Castor.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #18

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi zaliyanna,
hi all,
there is an update with more options
Enjoy
Working on JOOMLA (latest) and SEBLOD (latest)
The following user(s) said Thank You: zaliyanna

Re: Multiple fields d'ont work properly 1 year, 2 months ago #19

  • pixelism
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
Hi Castor,

Just a quick one..

Using Joomla 2.5.2 and SEBLOD 2.2.0 using your latest patch from today (07 03 12)

I have made a complete backup of a site (database and the whole site too).. which has a simple form with dropdowns (simple) and multiple selections via checkboxes..

I have installed the patch into a copy of the site..

Before I even start to get my head around the configuration for multiple selection I did a quick test on the search, just on the simple dropdown of Yes or No in this case F for Female and M for Male (Gender)-(knowing that the result had a "F" selected)..

I have found that since the patch all the normal (simple dropdowns) that were working no longer produce any results.. I assume this is due to the new patch files (all work on the previous back up site)..

I'm just wondering if I am missing something.. like do I need to remake every field now the new patch files are in place??

I even deleted the article with criteria and remade/submitted to see if this would then work.. unfortunately this didn't..

Like I say I have not even tried to do the AND or OR multiple selection (I want to use checkboxes) and have multi selection etc.

I've attached an image of the search form for reference to hopefully be a little clearer

simple-F-for-female-search-test.png


Any advice would be greatly appreciated.. and thanks in advance

PS: just a thought after reading through all the post's in this thread again.. I simply uploaded the patch files to their respective folders using FTP.. so without any further adjustment I am unclear as to how this could effect the database as it have not be "installed"? I feel I am definitely missing something.. I'm no good at French either (sorry :/) so had to translate some of the topic threads..
Last Edit: 1 year, 2 months ago by pixelism.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #20

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi pixelism,
SEBLOD is like a Swiss army knife. You have to know exactly what you're doing and what tools will be used as.

element simple (simple value in database) -> match: exact
for example: radiobuttons, select simple (static)

element multiple (values ​​separated by separator in database) -> match: Permissive (Default)
for example: checkboxes, select multiple (dynamic and/or static)

See database:
database.jpg


The patch concern only (Match: Permissive (Default) Storage: standard or custom) and not (Match: Exact).

simple_select_0.jpg


Put the match for this field of 'Exact'. This will be solve your problem.

simple_select_1.jpg


Enjoy
Castor

==> I've modified the patch slightly again. Now a simple select works also on (Match: Permissive (Default)
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 1 year, 2 months ago by Castor.
The following user(s) said Thank You: pixelism

Re: Multiple fields d'ont work properly 1 year, 2 months ago #21

  • pixelism
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
Hi Castor,

Many thanks for your reply

I've uploaded the latest patch and made the "simple" dropdown fields "exact" and can confirm these all appear to now be working fine

Now going to figure out the Checkbox Multi select..

Thanks again for your time it is very appreciated.

P

Re: Multiple fields d'ont work properly 1 year, 2 months ago #22

  • pixelism
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
Hi again Castor,

Not sure if it is that I need to make some adjustments now to the check-boxes for multiple selection.. Originally they had 1, 2 or 3 choices selected.. but now they have none and if I try and select one tick box and then save.. it un-ticks them..

I'm kinda guessing that this may possibly be a knock-on effect from the last patch version upgrade?

I haven't touched the check-boxes for multi select development/testing as yet, they are as original and have had no further development or adjustment currently made to them..

The check-boxes are currently set as Permissive (default).

Again any advice would be greatly appreciated..

P
Last Edit: 1 year, 2 months ago by pixelism.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #23

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi pixelism,
show me please your construction sheet in SEBLOD for example like this:

select_multiple.jpg


For testing, you should reduce the form ->

pixelism_problem_1.jpg


Show me the two missing construction sheets and let me see the #__cck_store_item_content and your #__cck_store_form_article (if it exists) like this or as SQL

mysql_database_view.jpg
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 1 year, 2 months ago by Castor.
The following user(s) said Thank You: SEBLOD - Bes, pixelism

Re: Multiple fields d'ont work properly 1 year, 2 months ago #24

  • pixelism
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
Hi Castor,

I'm afraid I do not have the:

#__cck_store_item_content or #__cck_store_form_article at all in my database..

I do however have #_cck_store_form_pa_profile which is the content type etc..

The Construction is pretty much exactly the same as yours above.. I didn't have the =1, =2 etc.. but have also tried this..

Like I say I have done nothing as yet to the checkbox fields .. I feel I need to go through all the threads again in this topic to do this.. I'm positive I'm missing something.. but I must admit I am a bit confused as some of the posts are are in French as are the image examples.. so although they are great.. for me they are a little unclear.. (sorry)..

My previous comment wasn't a knock at the patch I just assumed (probably wrongly).. that the check boxes now not saving (they did beforehand) was due to the patch?

I was sounding out whether this was the possible case? As I didn't want to continue and attempt the Mutli Select fields prior to confirming this..

Like I say I have done nothing to the checkbox fields in relation to preparing them to be multi select enabled (if that is the right way to put it?)

Obviously I don't want to be stupid too and be wasting your time Castor.. you time is appreciated

I will make a separate dev site and set-up a smaller form as advised and come straight back to you..

Many Thanks P
Last Edit: 1 year, 2 months ago by pixelism.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #25

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi pixelism,
I'm afraid I do not have the:

#__cck_store_item_content or #__cck_store_form_article at all in my database..

I do however have #_cck_store_form_pa_profile which is the content type etc..


I have:
  1. built a new site (JOOMLA 2.5.2 incl. SEBLOD JOOMLA Fix) with cck SEBLOD 2.2.0 without patch.
  2. create a checkbox (multiple element - rayon) with your data (* Cornwall ...)
  3. added this field to the article-form from JOOMLA
  4. created a searchform
  5. edit one record from JOOMLA with the new field
  6. tested searchform


Construction sheet in this case:
rayon:

database_fresh_after_patch_rayon_construction.jpg



SEBLOD generates a new table #__cck_store_form_article
database_fresh.jpg


with more then one selection SEBLOD returns any result because SEBLOD stores the data in the database with separator but in the SQL query this one is not included. The patch make just some corrections. After patch all related fields are stored with leading and closing separator. SEBLOD can now find each entry, as the search value is enclosed in separators.

Next I have:
  1. patched SEBLOD (patch seblod 20120308_2) see next image
  2. create select simple (Gender)
  3. modified JOOMLA article-form
  4. modified SEBLOD article-search-form
  5. edit some records from JOOMLA with the new field and the first field


And it works fine!!!!

SEBLOD can finally find the edited records.

search-form:

database_fresh_after_patch_construction.jpg


Database after patch:

db_after_patch.jpg


Output without selection (debug is activated):

output_after_patch_new.jpg


Output with selection (checkbox) (debug is activated):

output_after_patch_2_new.jpg


The result is ok!

Next I have:
  1. restore SEBLOD (patch files_before_patch_20120217) see next image
  2. all relevant records from JOOMLA stored again


Database after position 1 and 2:

db_before_patch_new.jpg


Output with one selection (checkbox) (debug is activated):

output_before_patch_1.jpg


The result is ok!

Output with two selections (checkbox) (debug is activated):

output_before_patch_2.jpg



SEBLOD can't find the relevant records, because SEBLOD does not use separator and the SQL query is a string pattern, which can not exist in this form and order, even with setting separator it would be impossible (logical error).

One possibility would be to set the items accordingly:
Position 3 in the construction sheet:

construction_sheet.jpg



Radio:
Exact

Checkbox:
Any Words = OR
Each word = AND

Select simple:
Exact

Select multiple:
Warning: implode() [function.implode]: Invalid arguments passed in ....\plugins\cck_field\select_dynamic\select_dynamic.php on line 219 -> Patch necessary
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 1 year, 2 months ago by Castor.
The following user(s) said Thank You: pixelism

Re: Multiple fields d'ont work properly 1 year, 2 months ago #26

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi pixelism,
The Construction is pretty much exactly the same as yours above.. I didn't have the =1, =2 etc.. but have also tried this..

Maybe you've set a blank as separator in the construction sheet of your multiple elements. In your case this does not work correctly, because you already have blanks in values​​. Use values like Mid Cornwall=1... and save your relevant records again.

Verify your storage statement in the construction sheet too!

See my post @25

Otherwise, send me an administrator login for your page as private message I will verify your construction.

Best regards,
Castor.
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 1 year, 2 months ago by Castor.
The following user(s) said Thank You: pixelism

Re: Multiple fields d'ont work properly 1 year, 2 months ago #27

  • pixelism
  • ( User )
  • OFFLINE
  • Fresh Boarder
  • Posts: 19
Hello Castor,

Again thank you for your replies and help here.. I figured out where I was going wrong

I didn't get back to you until now as I didn't want to bother anyone any further as I was sure I was missing something..

It was simple really.. but from my perspective easy to miss as everything else was done.. I had patched the site etc.. but what I was missing and may be a good note for anyone reading this thread..

I already had articles (Seblod / construction / Content types) listed from previous tests.. and also (more importantly) their records stored the spaces causing the issue that the patch corrects.. (in the database)

All I had to do to get it all working was go back to the fields.. get rid of a space in the separator (as you mentioned ) put the equals numbers (=1) on the end of the options and also most importantly the main thing missing was - re-tick the "Alter" tick box on the storage to update the database

Once this was done.. it all worked..

Again thank you for your time Castor and your generous offer to have a look for me.. all your efforts here have been greatly appreciated and I'm sure this thread will be a great help to others like me

Cheer PP
Last Edit: 1 year, 2 months ago by pixelism.
The following user(s) said Thank You: SEBLOD - Bes

Re: Multiple fields d'ont work properly 1 year, 2 months ago #28

  • nithinp89
  • ( Moderator )
  • OFFLINE
  • Moderator
  • Posts: 1140
Hi Castor,

I can confirm that Search on Multiple Fields (Check Box) works perfectly without any patch.

SEBLOD 2.1
Joomla 1.7

All you need to set 'Any Words' under Match.


What I have tested is:

> Create a form with Check Box Field
> Create an article by selecting two options (3BHK & 4BHK)
> On search form set match as 'Any Words'


In Search Form, I can list this article by

-> Select only 3BHK
-> Select only 4BHK
-> Select Both 3BHK & 4BHK
-> Select 3BHK and Any other option other than 4BHK
-> Select 4BHK and Any other option other than 3BHK

This is what i am expecting, hope every one needs this only.
Best Regards
Nithin Prathapan

5 Things to Start with SEBLOD
1. Documentation 2. Videos 3. Getting Started & FAQ 4. Tips & Tricks 5. SEBLOD Forum
Last Edit: 1 year, 2 months ago by nithinp89.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #29

  • Castor
  • ( User )
  • OFFLINE
  • Senior Boarder
  • Posts: 68
Hi nithinp89,
Here only for the checkboxes. I have tested the problem extensively. There is a logical error for all multiple fields.

If the values ​​are truly unique, there are usually no problems.

But, look here for example:

checkboxes_1.jpg


Your data in mysql-db:

checkboxes_database.jpg


SEBLOD stores your data with a separator

Now I create two queries:
Match: Any Words
checkboxes_2.jpg

the query match each entry in your database table which contains 1 OR 21
and
Match: Each Word
checkboxes_3.jpg

the query match each entry in your database table which contains 1 AND 21 (The second entry is also displayed, because it contains a 1 in 31 and 41 and of course the 21) - see: data in mysql-db (image 2)
If you can not control the values ​​for example queries to database tables and index as value - this certainly generates complications. You can solve the problem if you use the separator in the query.

Probably next week I will release a new patch for SEBLOD 2.3

best regards
Castor
Working on JOOMLA (latest) and SEBLOD (latest)
Last Edit: 1 year, 2 months ago by Castor.

Re: Multiple fields d'ont work properly 1 year, 2 months ago #30

  • Lionel73
  • ( Admin )
  • OFFLINE
  • Moderator
  • Posts: 963
Hello,
i don't understand because it work fine for me.

Just use "Any Words Exact" and you will get, for exemple :
AND ((t1.checktest = "2") OR (t1.checktest = "25") OR (t1.checktest = "56")) GRO


Best regards.
Lionel
7 Things to start with SEBLOD :
1. Documentation - 2. Videos - 3. Getting Started & FAQ - 4. Tips & Tricks - 5. SEBLOD Forum - 6. SEBLOD Support - 7. Octopoos Formations

If you use SEBLOD CCK, please post a rating and a review at the Joomla! Extensions Directory.
Thanks to you.!!"
Time to create page: 0.40 seconds