Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Question [Gelöst] mktime() expects parameter 1 to be long

More
14 years 10 months ago - 14 years 10 months ago #1 by kwally
Ich habe Joomla 1.5.10 mit kunena 1.09 und den dt. Sprachdateien 1.09
u.a. die class.kunena.php mit
* @version $Id: class.kunena.php 599 2009-04-03 19:44:26Z fxstein $

Beim Aufruf eines beliebigen Beitrags erscheint die Meldung
Warning: mktime() expects parameter 1 to be long, string given in /www/htdocs/*****
/components/com_kunena/class.kunena.php on line 1348

Die Meldung kommt nur bei importierten Beiträgen aus meinem alten Forum. In diesen hatte ich das Feld 'ip' und 'userid' leer bzw. auf 0 gelassen. Die Meldung verschwindet, wenn ich das Feld irgendwie willkürlich (127.0.0.1 bzw. 63) fülle.

Ich kann damit leben aber vielleicht ist dis ein Hinweis an den Programmierer.

Gruß
Klaus
Last edit: 14 years 10 months ago by Lintzy.

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #2 by Lintzy
Tritt das auch ohne deutsche Sprachdateien auf?

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago - 14 years 10 months ago #3 by kwally
Die Installation, die ich jetzt gerade aufbaue, will ich ich jetzt nicht ohne Not ändern.
Ich habe aber jetzt auf einer englischen Joomla-Instalation (1.5.10) die Kunena 1.09 frisch installiert. Dann habe ich einen Beitrag neu erfasst und per phpMyAdmin das Feld ip='' (leer) und userid=0 gesetzt. Außerdem habe ich zwei Datensätze der fehlerhaften deutschen Installation importiert.
Der Fehler tritt NICHT auf.

Könntest Du vielleicht mal die Zeile 1348 in class.kunena.php hier posten?
Ich habe leider keinen Editor, der die Zeilennummer anzeigt und ich verzähle mich regelmässig.

Danke
Klaus
Last edit: 14 years 10 months ago by kwally.

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago - 14 years 10 months ago #4 by Lintzy
Installier Notepad++, ist kostenlos und einer der besten Editoren überhaupt.

notepad-plus.sourceforge.net/de/site.htm

Das einzige, was in der (deutschen) class.kunena.php geändert wurde, ist ein string für die Zeitanpassung in der Profilansicht.

Und mktime deutet darauf hin. Warte ich guck mal.... bin gleich wieder da :lol:
Last edit: 14 years 10 months ago by Lintzy.

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago - 14 years 10 months ago #5 by Lintzy
Richtig, ab Zeile 1332 steht in der "deutschen" class.kunena.php neuer code, der in der originalen Datei nicht vorkommt, die endet mit Zeile 1329.

Das Problem hierbei ist (deutsches /europäisches Zeitformat), dies ist ein Projekt von mehreren Usern und hat mit der Entwicklung des Kunena Teams nichts zu tun. Es ist quasi ein Add-on. Aber Xillibit hat den Code in der class.kunena.php geschrieben, ich werde ihn auf das aufgetretene Problem hinweisen, er hat soviel Programmier-Skills, ich bin mir sicher, er findet dafür eine Lösung.

Ich persönlich vermute, dass eine Inkompatibilität mit der vorherigen Art und Weise, wie das Zeitformat in die Datenbank (vorherige Kunena - version) eingetragen war, auftritt.

Danke für den Report!

Ach ja... zeile 1348
Code:
1348: $datechanged=strftime('%d.%m.%Y - %H:%M:%S',mktime($datetochange2[0],$datetochange2[1],$datetochange2[2],$datetochange1[1],$datetochange1[2],$datetochange1[0]));
Last edit: 14 years 10 months ago by Lintzy.

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #6 by Lintzy
Mal ne Frage, zum besseren Verständnis: Wieso lässt du die Felder überhaupt leer? Wie passiert sowas?

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #7 by xillibit
Hello,

Do you have modified the hack european format ?

In the table jos_fb_users in your database, in the field birthday by example do you the birthday date in this format : 1989-04-12 ?
Same question in the table jos_users for the fields registerDate and lastvisitDate, with the dates in this format : 2009-04-09 19:47:45 ?

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #8 by kwally
Notepad++ ist geil. Bisher hatte ich ja immer ein stumpfes Taschenmesser namens WordPad benutzt und nun gleich eine elektrische Kreissäge-Klasse!

Damit die fragliche Stelle zu finden war einfach.
Der Fehler tritt auf, weil der an changedate() übergebene Parameter "datetochange leer ist.
Der Fehler verschwand nachdem ich in Zeile 1335
if(strlen($datetochange)==0) return $datetochange;
eingefügt habe.
Gruß
Klaus

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #9 by kwally
I have imported only the absolute minimum.
In jos_fb_users:
A birthday was not available, all fields are "0001-01-01" (without quotes)
in jos_users:
registerDate: "0000-00-00 00:00:00"
lastvisitDate: "0000-00-00 00:00:00"

The error disappeared after I inserted in line 1335
if(strlen($datetochange)==0) return $datetochange;

Thanks
Klaus

Please Log in or Create an account to join the conversation.

More
14 years 10 months ago #10 by Lintzy
kwally, Danke für das codesnippet. Ich hab xillibit gebeten, sich das mal anzusehen - er ist auch der Meinung, dass man das ohne Weiteres per Standard in die Zeithacks einbauen kann - werde ich bei künftigen Versionen also machen.

Please Log in or Create an account to join the conversation.

Time to create page: 0.370 seconds