jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Bugs => Topic started by: pinarayi on 17.08.2016 10:36:42

Title: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 17.08.2016 10:36:42
Tags are working in Joomla articles without any issue. But In version 3.2.45 of jdownloads, Joomla tags are not working. My Joomla version is 3.6.2.  When I click on the tags in jdownloads , it says "No matching items were found." In this URL you can find some tags for checking. http://202.88.254.120/ksebin18082016/index.php?option=com_jdownloads&view=category&catid=71&Itemid=817&lang=en .


I had created a menu item in the left menu named 'work tenders' for providing compact list of tenders with the tag ' Work Tender'. It also display the same message. Its URL is http://202.88.254.120/ksebin18082016/index.php?option=com_tags&view=tag&layout=list&id[0]=20&Itemid=823&lang=en . Please advise.
( I had verified jdownloads documentation many times and verified it. Replaced joomla with latest joomla update files. Installed jdownloads again. But tag support is not getting activated)
Admin username and password sent to moderator by PM
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 18.08.2016 12:46:36
Hi
Thanks for the description, that certainly helps any investigation.
First let me assure you that Tags are working on my test site but there is clearly a 'challenge' with what is happening on your site. I will look in detail to try to determine the source of your site problem.

Colin
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 18.08.2016 12:57:31
Yes. Tags are working in my another site. When I backup the jdownload data from other site to this site, it is working here also. So,I think it is related to jdownloads only.
I had already PMed the admin login details to you. I will give working site URL also. http://10.30.200.20/ksebin/index.php?option=com_tags&view=tag&layout=list&id[0]=14&Itemid=798&lang=en . You can see that here it works fine. If you want I can PM the admin login of this site also.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 18.08.2016 13:22:56
Hi
Yes please PM details of working site.  Also please see the PM I have just sent
Colin
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 18.08.2016 13:45:08
Details PMed. This is the working site.   http://202.88.254.120/ksebin/index.php?option=com_tags&view=tag&layout=list&id[0]=14&Itemid=798&lang=en .
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 21.08.2016 18:28:11
Dear collin, How can I make Tag work in this site? Is there any way to backup configuration from working site to non working site? Please advise.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 22.08.2016 00:14:23
Hi
I have been away for the weekend but back tommorow so have not had my main PC with me!!
Colin
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 22.08.2016 12:26:10
Thanks. I will wait
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 23.08.2016 09:32:11
I backed up Jdownloads from working site and restored to non working site. Then tag works fine in non working site also.In fact non working site is a mirror of production site. I tried many things with the backup file. But unable to locate the error that blocks joomla tags from jdownloads. Production site contains lot of new files and adds up every day. So, Just restoring old backups will not help.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 23.08.2016 15:06:11
Dear Collin, After extensive research I had identified the issue. 1. If you add a new download and provide tag it will work smoothly. contentitem_tag_map table will be appended with  relevant record. List of tagged items in Joomla menu option will work fine in this case. 2 If you delete/ unpublish a download, the entry in contentitem_tag_map table is not getting deleted. So, the deleted item will appear in the list of tagged items. If we click on the item in the report, it will generate 404 page since the download does not exist 3. If you add a new download without tag and later you edit the download and provide a tag. In this case a new record is inserted before last record ( Instead of appending) in contentitem_tag_map table . In this case tag is not  working. This download will not be shown in the list of List of tagged items in Joomla menu option. So, tags are not working in cases when we insert tags in existing downloads. For every new download with tag it works fine. Please give me a solution to tag existing downloads and removing tags for deleted/unpublished downloads. Please provide your advice.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 23.08.2016 20:03:33
Hi
I have been able to some extent reproduce the same problem on my test site.  I suspect that the behaviour on Joomla! 3.6.2 is "more agressive" than on Joomla! 3.5.1 and earlier.  It does seem to be related to the entry in the 'xxx_contentitem_tag_map' not being deleted when the entire Download has been deleted.  The 'xxx_contentitem_tag_map' also has in field "core_content_id"  the id of the Download in table 'xxx_ucm_content'.

Could you confirm it was the same Tag that was in the deleted Download and then when you addit to a 'new download'. Old Downloads are possibly causing a problem when their id was lower than the id of the deleted Download.

But I am not sure yet of the interaction with table 'xxx_ucm_content'.

I will check out some more aspects. Unpublished Downloads should just not appear in any front end listing. 

Similarly what appears in the front end depends on the permissions and view Access.  These are not the cause in your case as everything is 'Public'.

Colin
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 24.08.2016 10:38:05
Many thanks for the detailed bug report. I hope that i can fix it very soon.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 25.08.2016 15:13:24
Another issue related with the tags is incorrect updations of dates. Created Date,Modified date and published date shall be updated to tags table for every edit/save and publishing of downloads. My problem is that my production site is suffering because of this error. I have several downloads in that site and I had included tags in those downloads. But , they are not showing up in tags report. Is there any short term solution? Please update it in next version as many users prefer tags over categories.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 25.08.2016 18:01:41
Hi
But jD will update the dates!!
To explain note that editing a Download is not considered as an  'Update'. You have to specifically mark it as an update.In Downloads there is a specific field "Mark Download as Updated" which needs to be set to Yes.  Correcting say a minor spelling error is not considered by everyone as an update.  Maybe adding more description is not an update.  It is only a user that can truly decide what is an update.  Hence the field allowing the choice.
In the backend if you leave the field set to Yes then every save is an update.  If you set it to No then there is never a change to the updated date.
There is of course a similar field in the Front End Download editor.

Please see the two pics below.  The second pic has an updated date.  All I did was to Save the Download with the field "Mark Download as Updated" set to yes.

Colin
PS Please remember that both Arno and myself are doing this work unpaid in our own time just to help people and to improve a an already very good component.  It is a fact of life that the more flexible and comprehensive the component becomes so we find small bugs.  This time, as in many other instances, the most obscure bugs come about when Joomla! team make some unknown changes.  Apart from this incident the one that springs to mind is the problem with Captcha.
Of course we want to remove bugs as soon as possible but if a bug is found just before a release date then it is likely that the bug will have to wait because of the sheer volume of testing involved.  In the case of Tags and deleted Downloads/Categories the indications are that it should be in the next update.  But that is not a promise!
C

[gelöscht durch Administrator]
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: pinarayi on 25.08.2016 19:17:38
Thanks
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 02.09.2016 11:52:17
Hi pinarayi,
which menu types use you?
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 02.09.2016 13:46:04
I've discovered the same bug with editing existing downloads with tags. They're not shown. I'm looking forward to the solution.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 02.09.2016 14:21:17
@pinarayi:
@Colin:


Please try the unzipped file below and copy it over the original file here: /administrator/components/com_jdownloads/tables/
This should fix the problem when Downloads (with assigned tags) are deleted.

When a item is deleted it must also be deleted the corresponding datasets in the tables:
'_contentitem_tag_map'
and
'jdt_ucm_content'

Please note that the old (not removed) datasets still exists also after this bugfix and must be removed manually.

@Lena:
Are you sure that you have the same problem? Try also the bugfix.


[gelöscht durch Administrator]
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 02.09.2016 14:32:49
I edited  downloads and gave them tags. The tags are shown in the download list but after choosing a tag no downloads are listed.
"No matching items were found."
I didn't look into the database... The basic problem seems to be the same....
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 02.09.2016 14:37:41
Arno, sadly your file won't solve my issue with the tags.
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 02.09.2016 23:44:35
@Arno
Have tested the revised download.php and it worked AOK.  Removed entries in contentitem_tag_map and in ucm_content.  Tag listings were good.

@Lena
Could you PM us the super user login details so we can look at the problem.  Were you deleting Downloads with tags attached to them?
Please note if you had deleted a download then the xx_ontentitem_tag_map and the xxx_ucm_content tables will still have the bad entries so if they have not been manually removed then the same problem will remain.

Colin
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 03.09.2016 00:41:49
Thanks for the results Colin.  ;)
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 14.09.2016 11:15:52
Hi,

I found an article about another component. The description of the problem is basically the same as mine.

https://hwdmediashare.co.uk/blog/769-joomla-3-6-0-undesirable-change-affecting-joomla-tags-in-hwdmediashare

After trying the solution 2 the downloads are listed, when a tag is selected. It's not a great solution to make changes in the libraries, but I hope this helps to solve the problem itself. I you haven't already discovered it  ;)

Lena
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: ColinM on 14.09.2016 16:41:06
Hi
Can confirm this is a Joomla! bug that comes with latest Joomla! 3.6.x
It appears that with Joomla! 3.6.2 there is no problem with  tags in Downloads, it is only with tags in jDownloads Categories.  See Pictures below.

An Issue has been raised with Joomla! people as it has been introduced by a change in one of the Joomla! libraries
https://github.com/joomla/joomla-cms/issues/12038
Note that the correction in the Issue is not good and should be avoided.

There is a quick temporary fix by editing a Joomla! library as described below

The code in the region of line 582 in file libraries/cms/helper/tags.php is as shown below

            ->join('INNER', '#__content_types AS ct ON ct.type_alias = m.type_alias')

            // Join over categoris for get only published
            ->join('INNER', '#__categories AS tc ON tc.id = c.core_catid AND tc.published = 1')

            // Join over the users for the author and email

           
It should be edited to either remove the line
  ->join('INNER', '#__categories AS tc ON tc.id = c.core_catid AND tc.published = 1')
  or preferably to comment out the line by adding // so that the code now looks like
              ->join('INNER', '#__content_types AS ct ON ct.type_alias = m.type_alias')

            // Join over categoris for get only published
            // ->join('INNER', '#__categories AS tc ON tc.id = c.core_catid AND tc.published = 1')

            // Join over the users for the author and email


By just commenting it out then it is easy to restore.

ColinM

[gelöscht durch Administrator]
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 19.09.2016 14:51:42
Lena, i think that we have solved now the tags problems. We will publish in the next 2 days the final version 3.2.46.

(Please change not any core files - this is not required with the new version)
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 19.09.2016 14:55:19
Arno,

I also think that the problem is solved. I "commented out" the specific line in the core file and will reverse that as soon as the new version is released. I can't wait!  :D
Thanks for the help and all your hard work! You too Colin  ;)
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Lena on 08.10.2016 10:10:26
Hi Arno, hi Colin,

I did the update yesterday and reversed the changes in the library. But sadly the error isn't resolved.
If I comment out the "join" the tag lists are displayed with data. If I leave the command line in the library no results are displayed.

What is the next step here? Wait for the changes/solution from Joomla with the next update? I'd be fine with that  ;)

Just wanted to leave this information here and again thanks for your work!
Title: Re: Tags works in Joomla 3.6.2 articles but not working in Jdownload 3.2.45
Post by: Arno on 08.10.2016 11:03:53
Hi Lena,
would it be possible to get the login data (and the link) to your phpmyadmin and your Joomla backend via PM?

So i could check the state and maybe correct wrong values. Please not that it was not possible to solve all problems with the tags with the update. In the future new created tags should it works correct but not for all older tags for categories.