106 Posts
krkr
11 years ago
8
Topic

Hello

Article associations for languages works right, maybe one thing could be nice to change.

If new article is not saved you can't see associations fields at all, after save you can see other languages association fiels appear. Wouldn't it be nicer, that associations fields become visible at creation  and then after save disappears only field related to article language.

But the main problem is "Category associations" field

Added it to category form, but it shows always only articles associations, not category.

After new category save things doesn't change.

Tried to remove and add to form this field several times, nothing changed.

Thnx

Get a Book for SEBLOD
11 years ago
0
Level 1

Please hit edit button (right column) and move this topic to a more suitable forum category

106 Posts
krkr
11 years ago
1
Level 1

Hello

I believe that Language is also multilanguage and language associations. Or not?

11 years ago
0
Level 2

Sorry: I didn't saw the "languages".

Maybe editing the subject to include "Request"

10 years ago
2
Level 1

Hi, I can confirm this, reading the code of the jform_associations plugin you can see from line 79 to line 111

// Create Form
$addform = new SimpleXMLElement( '<form />' );
$fields = $addform->addChild( 'fields' );
$fields->addAttribute( 'name', $name );
$fieldset = $fields->addChild( 'fieldset' );
$fieldset->addAttribute( 'name', 'item_associations' );
$fieldset->addAttribute( 'description', 'COM_CONTENT_ITEM_ASSOCIATIONS_FIELDSET_DESC' );
$fieldset->addAttribute( 'addfieldpath', '/administrator/components/ com_content/models/fields' );
$hasForm = false;
foreach ( $languages as $tag=>$language ) {
if ( empty( $config['language'] ) || $tag != $config['language'] ) {
$hasForm = true;
$f = $fieldset->addChild( 'field' );
$f->addAttribute( 'name', $tag );
$f->addAttribute( 'type', ' modal_article' );
$f->addAttribute( 'language', $tag );
$f->addAttribute( 'label', $language->title );
$f->addAttribute( 'translate_label', 'false' );
}
}
$form = JForm::getInstance( $id, $addform->asXML() );
if ( $hasForm ) {
$form->load( $addform, false );
$associations = JLanguageAssociations::getAssociations( ' com_content', '#__content', 'com_content.item', $config['pk'] );
if ( count( $associations ) ) {
foreach ( $associations as $tag=>$association ) {
$form->setValue( $tag, $name, $association->id );
}
}
if ( $config['translate_id'] && isset( $config['translate'] ) ) {
$form->setValue( $config['translate'], $name, $config['translate_id'] );
}
}
As you can see here, right now it is hardcoded to associate just things of the "content" table... Also if you look at the code of the cck_storage_location joomla_category plugin, you will see around the line 323 this: 
// Associations 
// todo
I think this is something that will be developed in the near future but for now is not supported unless you develop your own cck_storage_location and your cck_field plugins...
4229 Posts
Kadministrator
10 years ago
1
Level 2

Please add this as feature request to the tracker.

10 years ago
0
Level 3

Done.

Here is the number of the request: 19006

Regards,

9 years ago
0
Level 1

Hello,

Does anybody know when the functionality will be integrated ?

I can't use SEBLOD categories for the moment ...

Thank you,

Regards

47 Posts
StanislavR
3 years ago
0
Level 1

Hi,

Has this problem whith field «Category Associations» any solution?

When I'm workinng «front end» my list of categories does not open (page not found), but the «admin» is OK.

Thanks.

Get a Book for SEBLOD