jDownloads Support Forum

Older Versions => jDownloads 3.2 (Support ended) => Bugs => Topic started by: UweS on 18.01.2017 17:15:16

Title: Modules for one language not working
Post by: UweS on 18.01.2017 17:15:16
Hello,
our modules "top" and "last updated" on our Homepage (right column) did work well for the last months. Now the modules are gone - but only for one language.
The modules are loaded with the  advanced module manager into the start page.

"DE" http://www.csm.de/de/ and "US" are shown, "EN" is gone.http://www.csm.de/en/
What happend? Where to search? Thank you
Title: Re: Modules for one language not working
Post by: ColinM on 19.01.2017 18:30:46
Hi
When did this happen? What version of Joomla! are you using and also what version of jD?  Have you updated something?
Colin
Title: Re: Modules for one language not working
Post by: UweS on 20.01.2017 08:50:43
Hi Colin,

thank you for your help.

Joomla! 3.6.5
jDownloads Version 3.2.46

I think - not sure - it happened with an update of a download file.

I will copy the complete system into a non puplic area an set all error reportings on. I did a  lot of testing and I am sure that it depends on the jdownload modules. I can see the jd database querys and the space for the modules reserved by joomla.
Title: Re: Modules for one language not working
Post by: UweS on 20.01.2017 13:28:46
Ok. I got a error:



Warning: Invalid argument supplied for foreach() in xxx/components/com_jdownloads/models/downloads.php on line 569



Warning: Invalid argument supplied for foreach() in xxx/modules/mod_jdownloads_last_updated/helper.php on line 85
Title: Re: Modules for one language not working
Post by: ColinM on 20.01.2017 15:40:48
Hi
Could you give the details of the warning messages please.
It could be you have a permissions mixup somehow.
Also please note that if you have the error level set to maximum it will get various warnings that are related to some strict coding conventions.  Warnings are not usually significant.

Also one of my 'challenges' here is that I have no experience of multi-language sites
Colin
Title: Re: Modules for one language not working
Post by: ColinM on 20.01.2017 15:59:55
Hi
I can see your site works for German and USA language but that the modules do not appear for English. Very Strange! :(
To give me a better idea about the multi language aspect I presume you create a Download for each language. For the three languages are these Downloads all pointing to the same file to download?

Would it be possible to have super admin access to your site so I can look for anomalies and protection things? If so please PM me the login details.  It could be your test version one rather than the real live one.  Things to look for could be for example if by some mistake the 'English' Downloads were set to say Registered Access or Download permission then the modules would not appear in the English version as jD would find nothing to show.

Are all the Downloads for each language listed OK in the Backend?

Colin
Title: Re: Modules for one language not working
Post by: UweS on 26.01.2017 08:46:58
Hi Colin,

every language has a different download file. There are no other error messages.

I did a complete reset of all permissions and a reset via jdownload tools. Every file exists and works at the download area. Only the modules don't work. Thanks
Title: Re: Modules for one language not working
Post by: Arno on 31.01.2017 12:15:36
Hi Uwe,
Colin hat mir die Daten für deine Testseite geschickt. Ich schau mir das mal an und dann werden wir bestimmt den Fehler finden. War aber eine Woche krank und bin auch heute noch nicht ganz fit. Komme also möglicherweise erst morgen dazu.  :-\
Title: Re: Modules for one language not working
Post by: UweS on 08.02.2017 15:34:11
Hallo Arno,

nach einer Woche testen und fluchen bin ich ein ganzes Stück weiter:

Die fehlende Ausgabe liegt nicht an den Modulpositionen oder ähnlichem.
-> Ich habe die Download Datenbank geleert und die Beispieldaten eingefügt. Dann waren die Module zu sehen.

Das Fehlen der Module hat direkt mit den Download Datensätzen zu tun.
-> Nach dem Löschen von Datensätzen wurde auf der deutschen Produktivseite das Modul wieder aktiv.

Anscheinend gibt es einige Seiten mit dem gleichen Problem: http://bit.ly/2lqxxDj  (Google Suche - und es sind ja nur die Seiten mit Fehlerausgabe...)

Die "große" Datenbankabfrage, welche die relevanten Datensätze zu den Downloads liefern soll, liefert (laut joomla Debugger) 0 rows zurück. Bei funktionierenden Modulen die entsprechende Kofigurierte Anzahl - bei mir 5. Der Fehler ist also irgendwo in dieser Abfrage oder in der Konsistenz der Datensätze zu suchen.

Ab diesem Punkt bin ich mit meinen php-Basis-Fähigkeiten leider raus.  :-\

Gruß Uwe
Title: Re: Modules for one language not working
Post by: Arno on 08.02.2017 17:01:08
Hallo Uwe,
leider hattest du auf meine letzten PM's nicht geantwortet. Daher wusste ich nicht wie der aktuelle Status bei dir aussieht.
Wie ich dir ja schon schrieb, konnte ich hier bei meinen Tests keinerlei Fehlverhalten feststellen.

Deine neuen Ergebnisse werde ich für weitere Tests verwenden. Kann aber nichts versprechen, da diese doch recht allgemein sind.

QuoteDer Fehler ist also irgendwo in dieser Abfrage oder in der Konsistenz der Datensätze zu suchen.
Das mit der Konsistenz der Datensätze halte ich für wahrscheinlicher. Werde es dementsprechend mit einer größeren Anzahl Datensätze testen. 

Edit:
Habe mir mal die Google Ergebnisse genauer angesehen. Vielleicht helfen die mir doch weiter, mal sehen. Scheint zumindest kein so verbreitetes Problem zu sein.
Title: Re: Modules for one language not working
Post by: Arno on 08.02.2017 19:17:40
Hi Uwe,
habe jetzt die Datei models/downloads.php etwas erweitert um die Fehlermeldung zu unterbinden.
Der Fehler trat auf, wenn die Variable $items unerwarteterweise kein array war. In der Änderung überprüfe ich dies daher zuvor. Kannst die Datei gerne mal ausprobieren (s.u.).

Allerdings ist damit noch nicht geklärt, warum die Variable keinen, bzw. falsche Werte enthält. Da schau ich dann morgen mal nach.

[gelöscht durch Administrator]
Title: Re: Modules for one language not working
Post by: UweS on 09.02.2017 09:00:14
Hallo Arno,

vielen Dank für die Änderung. Der Fehler wird noch nicht ganz unterbunden. $items sind gesetzt aber bestehen aus einem leeren string.   if (isset($items) && is_array($items)){

behebt die Fehlermeldung ganz.
Title: Re: Modules for one language not working
Post by: Arno on 11.02.2017 01:15:51
Ja hast recht, ist besser so.
Title: Re: Modules for one language not working
Post by: Arno on 13.02.2017 12:19:12
Hallo Uwe,
leider gelingt es mir auch nicht mit deinen Testdaten die fehlerhafte Anzeige zu erzeugen.
Weiß daher jetzt auch nicht weiter. Bei dir läuft es jetzt aber wieder korrekt (mit den letzten Änderungen)?
Title: Re: Modules for one language not working
Post by: UweS on 20.02.2017 08:41:12
Hallo Arno,

jetzt wird die Ausgabe der Fehler unterdrückt - im Produktivsystem gibt es an dieser Stelle dann leider keine Downloads. Für das erste nicht brennend schlimm, ich werde aber nochmals auf Fehlersuche gehen.

Gruß und Danke

Uwe