11 years ago
5
Topic

If you save multiple independent Select fields (FieldX or not FieldX) with the Custom storage method, only the changes made will be saved, all other Select fields will be set to NULL. This does not happen with Article (Related), only the Select drop-downs.


For instance, if I create a new item and have two select fields, I can modify both of them and save, no problem. As soon as I change one of those fields and not the other, it will set the unchanged field to NULL and the changed field to the new value. This looks like a bug.

Get a VIP membership
11 years ago
4
Level 1

Hello Saturn2888,

can you post a screenshot of the storage of your field please.


Custom storage must be like:

Custom  |  Article  |  database_name_field[field_name]

with that you can store more than 1 form field in 1 database column and it work well.

In 99% of case, prefer to choose "Standard" storage. It will be more faster when you will make search on database.
Keep Custom storage for FieldX and GroupX.

Regards.
Lionel

11 years ago
0
Level 2

[DELETED]

11 years ago
0
Level 2
Ok cool, Standard works now for me.

For FieldX, you said I should use Custom and introtext. Does that also mean I should make the field it's pointing to also Custom or that can be Standard?

Thanks!
11 years ago
0
Level 2

I changed everything around and eliminated some issues. After much testing, I've got it down to one last problem.


The problem now only shows up for a FieldX of a select box. The select_json I'm using here is custom, but it is using the select dropdown code from Seblod.


To reproduce:

  • Select an entry from the dropdown
  • Save
  • Add another dropdown to the FieldX (+)
  • Select an entry
  • Save

Now only the new one shows up and the old one is deleted. Essentially, it is only saving the newest FieldX. What happened?


Here's the db for those fields:

  id  title  name  folder  type  description  published  label  selectlabel  display  required  validation  defaultvalue  options  options2  minlength  maxlength  size  cols  rows  ordering  sorting  divider  bool  location  extended  style  script  bool2  bool3  bool4  bool5  bool6  bool7  bool8  css  attributes  storage  storage_location  storage_table  storage_field  storage_field2  storage_params  storages  checked_out  checked_out_time   
------  ---------------------------------  ---------------------------------  ------  -----------  -----------  ---------  ---------------  -----------  -------  --------  ----------  ------------  -------  ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  ---------  ---------  ------  ------  ------  --------  -------  -------  ------  --------  ---------------------------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ------  ----------  --------  ----------------  -------------------------  ---------------------------------  --------------  --------------  --------  -----------  ---------------------
  5140  Video Association WordPress  video_association_wordpress  515  select_json  1  Featured Video  3  {"id_field":"js-featured-video","request_field":"\/api\/video\/get_list\/","collection_field":"posts","option_field":"title","value_field":"url"}  0  255  32  0  0  0  0  0  0  0  0  0  0  0  1  standard  joomla_article  #__cck_store_item_content  video_association_wordpress  0  0000-00-00 00:00:00  
  5142  Video Associations WordPress  video_associations_wordpress  515  field_x  1  Featured Videos  3  1  10  32  0  1  0  0  0  video_association_wordpress  1  1  1  0  0  0  1  custom  joomla_article  #__content  introtext  0  0000-00-00 00:00:00  
 

11 years ago
0
Level 2

[DELETED]

Get a VIP membership