? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
19 Jul 2018

Pull Request for Issue #21178

Summary of Changes

Changing #Jform_title to #Jform_name as these components are using name instead of title.
Thanks @SharkyKZ for the hint.

Steps to reproduce the issue

Create a multingual site. 2 languages are enough.
Create a contact in each language and associate them in their edit page.
Load Multilingual Associations component.
Select Contact as type and one fo the languages.
Click on the greyed icon in the Associations column.
This will load the side by side page.

Expected result

When using the Associations Tab for the reference and the target items, the field for the other language should display the name of the associated contact.

Actual result

It does not.
As you can see in the animated gif below, it does flash the name for a second at reload, then disapears as soon as the Target finishes loading.
assocfieldcontact

After patch

screen shot 2018-07-19 at 11 31 09

Note

It will also work for newsfeeds.

@SharkyKZ @franz-wohlkoenig @rdeutz

avatar infograf768 infograf768 - open - 19 Jul 2018
avatar infograf768 infograf768 - change - 19 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jul 2018
Category Administration com_associations JavaScript
avatar infograf768 infograf768 - change - 19 Jul 2018
The description was changed
avatar infograf768 infograf768 - edited - 19 Jul 2018
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

@infograf768 will test later on.

avatar infograf768
infograf768 - comment - 19 Jul 2018

Restarted drone...

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

I didn't get what to look for without PR. Reference and Target are loaded on Tab "Edit Contact", didn't see any Flash.

Can you please advice?

screen shot 2018-07-19 at 12 39 49

avatar infograf768
infograf768 - comment - 19 Jul 2018

You have to display the Associations tab, not the Edit Contact

avatar SharkyKZ
SharkyKZ - comment - 19 Jul 2018

$this->referenceTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title');

$this->targetTitle = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title');

Combine these into one?

avatar infograf768
infograf768 - comment - 19 Jul 2018

Combine these into one?

I don't think so. We have to differentiate them in the edit.php as well as in the sidebyside. js
Similar code to $this->referenceLanguage and $this->targetLanguage

If we wanted (but it adds a line), we would have
$this->title = AssociationsHelper::getTypeFieldName($extensionName, $typeName, 'title');
and then
$this->referenceTitle = $this->title;
and further
$this->targetTitle = $this->title;

avatar SharkyKZ
SharkyKZ - comment - 19 Jul 2018

$this->referenceLanguage and $this->targetLanguage refer to field values which can differ between reference/target. Meanwhile field names are always the same.

This can be simplified in the layout/js too by adding data attribute to the entire form, like data-associatedview

<form action="<?php echo JRoute::_('index.php?option=com_associations&view=association&' . http_build_query($options)); ?>" method="post" name="adminForm" id="adminForm" data-associatedview="<?php echo $this->typeName; ?>">

avatar SharkyKZ
SharkyKZ - comment - 19 Jul 2018

And without proposed change notice appears:

Notice: Undefined property: AssociationsViewAssociation::$targetTitle in /administrator/components/com_associations/views/association/tmpl/edit.php on line 59
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

@infograf768 no flashing: click on Tab "Associations" works as expected.

avatar infograf768 infograf768 - change - 19 Jul 2018
Labels Added: ?
avatar infograf768
infograf768 - comment - 19 Jul 2018

Notice: Undefined property: AssociationsViewAssociation::$targetTitle in /administrator/components/com_associations/views/association/tmpl/edit.php on line 59

I have corrected this as I did not test when there is NO association set. In that case indeed we have the Undefined property.

avatar infograf768
infograf768 - comment - 19 Jul 2018

@franz-wohlkoenig

no flashing: click on Tab "Associations" works as expected.

When there are already associations, it does not as the wrong form is selected in sidebyside.js
Please re-read test instructions.

avatar infograf768
infograf768 - comment - 19 Jul 2018

This can be simplified in the layout/js too by adding data attribute to the entire form, like data-associatedview

I will test this

avatar infograf768
infograf768 - comment - 19 Jul 2018

@SharkyKZ
Your proposal to simplify does not work.
As I corrected the "undefined property", please test again. We need to get this in for 3.x and then correct 4.0

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 19 Jul 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2018

I have tested this item successfully on 06ed412


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21180.

avatar zero-24
zero-24 - comment - 22 Jul 2018

I get the following js error and the spinner did not end.
image

I have installed a new 3.8.10 with de & fr for all other i have followed the instructions.

avatar zero-24 zero-24 - test_item - 22 Jul 2018 - Tested unsuccessfully
avatar zero-24
zero-24 - comment - 22 Jul 2018

I have tested this item 🔴 unsuccessfully on 06ed412


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21180.

avatar infograf768
infograf768 - comment - 23 Jul 2018

@zero-24
I have corrected this real error in the js. (I had only corrected it before in the php)
(Although, it did not prevent the patch from working here, i.e. did not get the spinning. May depend of browser.)
can you test again?

avatar infograf768
infograf768 - comment - 23 Jul 2018

@franz-wohlkoenig
Please test again. This time also look in the browser console. There should not be any more error message.

avatar durubayram durubayram - test_item - 23 Jul 2018 - Tested successfully
avatar durubayram
durubayram - comment - 23 Jul 2018

I have tested this item successfully on 731e47d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21180.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 23 Jul 2018 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jul 2018

I have tested this item successfully on 731e47d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/21180.

avatar franz-wohlkoenig franz-wohlkoenig - change - 23 Jul 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 23 Jul 2018

Ready to Commit after two successful tests.

avatar mbabker mbabker - close - 24 Jul 2018
avatar mbabker mbabker - merge - 24 Jul 2018
avatar mbabker mbabker - change - 24 Jul 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-07-24 00:15:12
Closed_By mbabker
Labels Added: ?

Add a Comment

Login with GitHub to post a comment