News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

pagination error after upgrading from j2.5 to j3.4

Started by smartgig, 05.04.2015 12:56:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

smartgig

Hello,

I had joomla 2.5 with jdownloads on my website, I upgraded it to joomla 3.3 (and recently 3.4) recently.
Now I found that the downloads which are created in joomla 2.5 aren't working, but those which are created in joomla 3 are working fine.
How can I address the issue?

Here is the link of an affected page:
URL Link

Description on the following page (check the middle of the description picture):
Description Link

I'm using  jDownloads Version 3.2.31 and Joomla! 3.4.1 on PHP/5.4.21 and MySQL 5.5.42
Thanks
  •  

ColinM

Hi
Before trying anything to correct the problem please make a site backup  - personally I use Akeeba.  Also please excuse all the questions as I am trying to understand the process you went through!

Which version of jDownloads were you using on Joomla! 2.5?  Was it jD2.5 series or jD1.9.1.x series?

When you say the old downloads are not working is it because it reports you do not have permission?  If it is permissions then please try the jDownloads backup/restore sequence as described in the article "http://www.jdownloads.net/documentations/item/permissions-problems-after-migration-to-new-series"  This is sometimes a problem with coming from the 1.9. series but it may also apply to the jd2.5 to jD3.2 series.

What sequence did you do with jDownloads when migrating from Joomla 2.5 to Joomla 3? 
Did you create any jDownloads categories/downloads in jD3.2 before restoring the old jD2.5 data?

Colin
PS do you still have the old Joomla 2.5 site?
Colin M
  •  

smartgig

I followed the instructions mentioned here to upgrade my jdownloads file. My latest jdownloads version in joomla 2.5 was  1.9.2.11 Beta.

Here is the description of the problem:

The jdownload files which are created in joomla 3 and are working properly has the following format:
/index.php?option=com_jdownloads&view=download&id=<id>:<title-of-the-file-even-with-utf8-characters-(persian-in-this-case)>&catid=<catid>&Itemid=<itemid>

The jdownload files which are created in joomla 2.5 and currently doesn't work in joomla 2.5 (returns a 404 page) has the following format:
/index.php?option=com_jdownloads&view=download&id=<id>:<title-of-the-file-ONLY-english-characters-are-allowed-AND-utf8-characters-(persian-in-this-case)-are-dropped-NUMBERS-are-kept-IF-the-title-had-no-numbers-USE-creation-time-and-date-of-the-jdownload-entry>&catid=<catid>&Itemid=<itemid>

The problem only affects files with Persian name.
  •  

ColinM

Hi
We might have two things happening here.  First I understand that you we running jD 1.9.2.11 beta on Joomla 2.5 and that the Downloads there did not work on Joomla 2.5.  Further those Downloads are also not working on jD3.3 on Joomla 3.x

Now jD 1.9.2 series was designed to run on Joomla 3.x not Joomla 2.5.x  It was jD 1.9.1.x that runs on Joomla 2.5. So it may be that the old "Joomla 2.5 Downloads" are not properly recoverable.

But I think you said it is only the ones with Persian ttitles that have the problem. Are there many of them?

When you say they do not work are there any error messages or dothey just not start downloading?

Colin M
  •  

smartgig

Hello ColinM

Thank you for your reply.

jD files were working fine on joomla 2.5 and we had no problem there.
The problem only applies to files with persian title and almost all files have a persian title.

The problem here is that jD on joomla 3 expects the persian title to be present in the URL whereas jD on joomla 2.5 doesn't expect any persian character in the url.
It simply returns a 404 joomla page not found error and it's not possible to view file description page of the affected jD entry which contains download link.
  •  

ColinM

Hi
Still searching for clues!  I think I understand the symptoms.  Visited the page you suggested.  All except the last one downloaded OK.  The last one gave a 404 error as you said.  See pic pagination01.png

From my test site with Joomla! System settings, Global Config - Site tab: Search Engine Friendly URLs as Yes and Use URL Rewriting as Yes then the link was of the form
<a href="/j32/list-subcata1/download/23-subcata3/97-downloada3-1">downloadA3-1</a>  The part displayed twice, namely "downloada3-1", is the Download title, not the file name.

Changed Global Config - Site tab: Search Engine Friendly URLs as No and Use URL Rewriting as No then the link was of the form
<a href="/j32/index.php?option=com_jdownloads&amp;view=download&amp;id=97:downloada3-1&amp;catid=23&amp;Itemid=1247">downloadA3-1</a>

Can you confirm that you have Search Engine Friendly URLs as No and Use URL Rewriting as No?

Topic http://www.jdownloads.com/forum/index.php?topic=8049.msg32194#msg32194
Page accessed in site is from
<a href="http://www.sibtayn.com/fa/index.php?option=com_jdownloads&amp;view=category&amp;catid=10&amp;Itemid=2596" target="_blank">URL Link</a>

All the following were by clicking on Download Title, not the download 'button'  In all cases except the bad one it went to the download details page.

Good one, 2nd from bottom, has generated code as:
<a href="/fa/index.php?option=com_jdownloads&amp;view=download&amp;id=3430:سيد-مهدی-ميرداماد-كليپ-بی-تو-زهرا-عليها-السلام-فروردين-1393&amp;catid=10&amp;Itemid=2596">سيد مهدی ميرداماد - كليپ بی تو زهرا عليها السلام ... فروردين 1393</a>

Another good one is top one has generated code as:
<a href="/fa/index.php?option=com_jdownloads&amp;view=download&amp;id=3452:آيا-مقام-حضرت-زهرا-سلام-الله-عليها-بالاتر-است-يا-مقام-حضرت-مريم-عليها-السلام-؟&amp;catid=10&amp;Itemid=2596">آيا مقام حضرت زهرا سلام الله عليها بالاتر است يا مقام حضرت مريم عليها السلام ؟!</a>

My knowledge of Persian script is zero so excuse my ignorance here  In the 'good ones' there are two Persian scripts, which I believe are the same and they are the Download title, not the file name. Is that correct?

Bad one - the bottom one - has generated code as:
<a href="/fa/index.php?option=com_jdownloads&amp;view=download&amp;id=3428:1392&amp;catid=10&amp;Itemid=2596">حاج محمود كريمی - كليپ دستهای مادر ... - 1392</a>
This only has the Download Title once!!
This one has the number 1392 instead of the name. It looks as if the download with id 3428 has something messed up in its database entry. But not sure.
I will need to consult with Arno.

Could you please look at the 'bad' download in the backend to see if file name is OK, and also if you look at it in the jDownloads directory structure.

Colin

[gelöscht durch Administrator]
Colin M
  •  

smartgig

#6
Dear ColinM,
Thank you for your reply.

I checked the joomla global settings section and confirm that all the SEO settings flags are set as off. (Saved again)
And yes, it has nothing to do with file name but the jDownload entry title.

The working URLs have full jD entry title (even with persian characters) after the id number followed by a "-" character
The 404 URLs doesn't have this entry title after the id number (persian characters are somehow omitted, numbers are kept).

You see, in the bottom of the page, you can proceed to the next pages of that section and all the rest jD entires return 404 error (see attached screenshot)

[gelöscht durch Administrator]
  •  

ColinM

Hi

Do you have Joomla! caching turned on or are you using some other extension that provides caching?  If you have then please turn it off and clear your browsers cache (which browser are you using?).  Then re-test to see if any change. Let me know please.

For the moment let us stay with the 'bad' one at foot of page.  Could you check the bad file on your server file system, either through cPanel if you have that on your server, or through an FTP client such as File Zilla, or by say the eXtplorer extension to double check that the file is there, it has the expected name, and it has the correct permissions.  I do not expect anything to be wrong but it is just to eliminate possibilities.

Make sure you have a copy of the file on your PC.  Then from the Backend Downloads delete the file and save.  Clear your Browsers Cache and reload front end. Please advise what is reported if you now try to download.  It should of course tell you nicely that you cannot.

Next from Backend reload the file from your PC.  Again please advise what happens.

Colin
Colin M
  •  

smartgig

#8
Hello ColinM,

Thank you for your reply.

I investigated the issue and found that it has to do with the "Alias" of jD download entry.

When I set the "Unicode Alias=ON" in the joomla SEF settings, jD automatically fills the Alias of the download with download title (which is persian).
By having "Unicode Alias=OFF", it automatically drops Persian chars. If there's any number in the title, the number is kept and is set as alias. If there weren't any numbers in the title, the alias is left as blank and would not appear in the URL.

I attached a picture of the jD admin entry of the 'bad' one at foot of the first page.

The alias is automatically set to 1393 and this is causing the problem. The URL wouldn't work because of this alias. If I remove it or change it to something rather than a number (like english chars), it would work. Here's other aliases and the results:

139463456456456456 -> 404 error
139463456456456456a -> 404 error
a139463456456456456 -> Works fine!
139463456456456456dadasd-adas-dasd-asd-asd-asd-asd-asd -> 404 error

It seems that the RegExp which is used for URL parsing has a problem with aliases starting with number...

[gelöscht durch Administrator]
  •  

ColinM

Smartgig
Excellent detective work!  As I understand it if Joomla! setting "Unicode Aliases" in Global Config - Site tab is Yes then it works, but if it is No And the alias starts with a number then it is wrong.  The Joomla! hint says that transliteration  is used but if all of the Persian Characters are dropped then it would seem there is a fault with the Joomla! transliteration as well.
Will of course look into the  RegExp which is used for URL parsing has a problem with aliases starting with a numerical digit.

Colin
Colin M
  •  

ColinM

Hi
Just some further notes.

jDownloads carries out transliteration by using the transliteration function "public static function transliterate($string)" which is supposed to be in xx-XX.localise.php in the language pack (fa-IR.localise.php for Persian).  This function is not present in the Persian language pack.  The Persian translators have a website http://www.joomlafarsi.com/ which is of course entirely in Persian.  Maybe you could ask them if they plan to add a transliteration table.  A Google search indicates there are transliteration tables available.

Colin
Colin M
  •  

smartgig

#11
Thank you for your kind reply ColinM,

I figured out why the URLs were working in joomla 2.5 website.
jDownloads doesn't add any part of the alias to the URL when SEO is not active. (Sample link in joomla 2.5)

As a workaround, is it possible to make jD not to ad any part of the alias to URLs?
  •  

ColinM

Hi
Will have to consult with Arno on the way forward here in the short term.  It is an area we had "challenges" with in the early beta versions so we will not want to upset that!  I am not sure but maybe there needs to be a check on where a transliteration function exists in the current site language and then take appropriate action.

There is also the problem that Joomla! 3 seems to have now incorporated a new alias style, and this has also had knock-on effects.

Colin
Colin M
  •  

smartgig

I didn't get what you meant by transliteration function.
  •  

ColinM

Hi
Transliteration is an alternative way of "translating" sometimes used for aliases.  Transliteration is essentially a look up table where those characters outside the very basic set of Latin characters have a Latin 'equivalent'.  It is relatively straight forward in most European languages, including Cyrillic and Russian. For example the German 'ö' transliterates to 'o'.  Transliteration tables are available for Persian, one such source is http://www.iranicaonline.org/pages/guidelines and there are United Nations published versions.  Hope this helps .

Also it is useful to see https://docs.joomla.org/J3.x:Making_a_Language_Pack_for_Joomla
Colin

PS could you please confirm it is OK if you use Unicode Alias in Joomla!
Colin M
  •