Skip to content

JCckContent fails with the same field names #847

@Ilya-Zhulin

Description

@Ilya-Zhulin

Hello everybody, I'm very glad that SEBLOD is alive because I was really afraid that project is ended. Thanks to devs for it.
My problem is next:
I have two fields in my Content Type with the same storage_field but locates in different tables. All rules allowed it. So, I have few problems with them when tried to update them by JCckContent in my script:

  1. I tried to use setProperty('storage_field', 'value') and found that field in "main" table was updated only (#__cck_store_form_contenttype). I check the code and found that properties are collected as storage_fields in self::$types[$this->_type]['data_map'] array - so it can't be two the same property names in array.
  2. OK, I renamed storage field in my second table (#__cck_store_item_categories) and it was updated (added new in my case). But I found that cck field is empty - it wasn't updated during add by JCckContent. Also, I can't set it by setProperty, because there is no such property in data map.

So, I suggest to make "property" as field name, instead of storage filed name. Field name is uniq, it can solv this trouble. Also, we need to check and fill cck field after update more and more2 tables.

Joomla 5.4
SEBLOD 4.5.2

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions