News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Multiple entries in front end view V3.2.34 - [Fixed in 3.2.35!!!]

Started by ddjenkins, 02.07.2015 05:55:00

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ddjenkins

Hi,

I've just updated to the latest version, 3.2.34 & suddenly in the front end I have 3 entries for the same download. This is accessed via a Jdownland menu item, single category. If you look at the attached you can see the July newsletter 3 times, the June, May April the same. For some reason their being repeated. In the back-end there is only one entry.

Any advise on how to fix this would be appreciated.


[gelöscht durch Administrator]
  •  

ColinM

Hi
Do you have multiple menu entries referring to the Newsletters?

Colin
Colin M
  •  

pippo8765

Hi Arno (and others),
I've been using jDownloads for quite a long time now and it's like integral part of every my website. I noticed unusual bug with 3.2.34 version: downloads entries are shown duplicated for just some categories, no obvious reason found within category settings!
http://www.ni.ac.rs/dokumenti/pregled-aktivnosti-univerziteta/category/15-konkursi-univerziteta-u-nisu
Now this is public category, I also have one for just particular group of users, but it acts the same way.
Joomla versions I tested with: 3.4.1, 3.4.2, 3.4.3 - all act same way!
php versions: 5.3.10, 5.3.17, 5.5.12 - also same bug stays.
jDownloads versions: 3.2.34 - has bug. Previous one I had is 3.2.31 I just copied com_jdownloads folders for both FE and admin and it WORKS OK!
No matter where site is hosted (WAMP or not integrated Linux server as in upper link) - bug stays.
I read this post: http://www.jdownloads.com/forum/index.php?topic=8167.0 but it does not solve my problem.

Also,
- file type has nothing to do with it: zip, pdf, txt... all act the same. I used exactly same file for two different categories and in one it doubles in other no. I have many categories, but I noticed this for only 2.
- In database entries are ok, they're not doubled.
- In backend everything is also ok, I see single entries.
- Categories are configured all the same, I did change layout, but no element there can not, of course, affect one category and not all others.

I have no much 3rd party extensions, none regarding SEF. What puzzles me the most, once again, is that I have completely same config for categories which act differently.

What can be reason this happens? I am also trying to figure it out within code, but for now I see no reason why some entries could be doubled! No such "IF" I can see.
Thanks!




[gelöscht durch Administrator]
  •  

pippo8765

#3
I just located which part of code creates this error for me:
It's within \components\com_jdownloads\models\downloads.php file, line 354:

// Join on menu table. We need the single category menu itemid when exist                                                                                                  
       $query->select('menuc.id AS menuc_cat_itemid');
       $query->join('LEFT', '#__menu AS menuc on menuc.link LIKE CONCAT(\'index.php?option=com_jdownloads&view=category&catid=\',a.cat_id,\'%\') AND menuc.published = 1 AND menuc.access IN ('.$groups.')') ;


As soon as I put comment on these lines - ALL WORKS! Can you confirm this might couse trouble in some cases?
For me (as comment above lines in code says what it actually works) it creates double entries if I have link to that particular category somewhere in menu tree, but furthermore, even this is not always the case: I have link to some categories, but they act ok. Then again, one of categories is not even linked and it doubles entries.
I echoed query code on the page, pasted it into phpmyadmin SQL window (replacing table names, of course) and it gives results in list just like on the page (for those doubled it stays doubled, for those which are not - single entries appear), which is expected, I am just mentioning...
  •  

pippo8765

#4
Hi,
sorry I did not see this topic earlier (though it was created just before mine: http://www.jdownloads.com/forum/index.php?topic=8286.0 and I followed all forum ruls - except LOOK THE LATEST TOPIC :) ). Sorry once again!
Same issue, I even managed to localize the problem in code.
May admins please merge these topics! Thanks!

For one of my categories that acts like this I have link within menu tree, for other - no. One of the categories is even often being emptied and filled again, containing some temporary files...
  •  

pippo8765

#5
UPDATE: (solved?)
I have category with ID = 11. This one is NOT linked within menu. Now if I make menu links to categories that have IDs like 115, 118, ... i.e. that begins with "11" - my category with ID 11 will create double instances. As soon as they're all unpublished / removed, 11 is not a problem anymore. All others can exist.
I presume this is because SQL query contains "LIKE" statement in part of code I mentioned above.
For myself, I tested by changing code by replacing word "LIKE" with "=". I must wait for Arno or ColinM to confirm this is ok, but for now I am getting all results ok: no more double entries and menu items are in active state if I am into one of menu linked categories!
Also, some above lines refer to symilar:
\components\com_jdownloads\models\downloads.php file, line 350:
// Join on menu table. We need the single download menu itemid when exist                                                                                                 
        $query->select('menuf.id AS menuf_itemid');
        $query->join('LEFT', '#__menu AS menuf on menuf.link LIKE CONCAT(\'index.php?option=com_jdownloads&view=download&id=\',a.file_id,\'%\') AND menuf.published = 1 AND menuf.access IN ('.$groups.')') ;

This is just for single download link, of course, but might also create same error. I replaced "LIKE" with "=" there too.
I hope this helps in quick debugging.
Cheers!
  •  

ColinM

#6
Hi
I have merged the two topics.
@pippo8765  -
Excellent detective work ;D think your solution is good but need final confirmation from Arno as he knows far better than me in database items!  The change was made for some reason to fix some other 'oddity' so that will also need revisiting.

Colin
Colin M
  •  

ddjenkins

Hi Colin,

Yes I do have 2 menu items pointing here & the jDownloads Latest module also points to this view.

Regards, Daniel
  •  

ddjenkins

Hi Colin,

Any idea when we might get a fix for this?
  •  

ColinM

Daniel,
The items for the next version are being looked at and this one should be included - I hope. Been a bit of delay due to holiday season and so on.    Arno is on the case! There are also some additional tools we are looking at.

Colin
Colin M
  •  

Arno

Yes it seems to exist (sometimes?) a problem with double files when users created additional menu items for single categories.
I will try to solve this very fast now for the next version 3.2.35.

Until this fix should it help to unpublish the single category menu items.

Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

pippo8765

Quote from: Arno on 18.07.2015 13:30:56
Yes it seems to exist (sometimes?) a problem with double files when users created additional menu items for single categories.
I will try to solve this very fast now for the next version 3.2.35.

Until this fix should it help to unpublish the single category menu items.


Hi Arno,
yes, problem exists just sometimes, when match occures in IDs ("LIKE" statement in query). I explained problem and there might be solution, too, read upper posts.
Pay attention that same thing happens if you have single download published as menu item, not just categories.
I hope you issue new official version fast. Thanks!
  •  

Arno

Hi pippo,
it seems that you had found the bug with the sql query. An important hint!  ;)
Maybe can you try the fixed version below and post then your result here?
Thanks!
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

pippo8765

Hi Arno,
Update from 3.2.34 went ok (Update process succesfully executed.), except I got notice from php (I have display errors set to ON, majority of users who have it OFF might not even see this, but will lack in graphic rows division, I presume that's the goal there):

Notice: Undefined variable: rows in ... tmp\install_55ab5ce304323\com_jdownloads\script.php on line 1232
I think you're missing one "$rows = 0;" for function update($parent) within script.php :)

But important thing for now is: the problem described within this topic for 3.2.34 version - IT'S GONE! All works like a charm now, single documents shown in frontend, as it should be.
I did not check if you maybe added some more issues to changelog for 3.2.35.
Thank you for quick response, as always!
  •  

Arno

Hi pippo,
many thanks for the results.
So we could fix this problem in jD 3.2.35 (coming soon).  ;)
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •