Forums


Discussions (en)

Forum for Discussions - Discussion Forums for Joomla! 1.5. Posts in english language.
Last post
Forums  » Discussions (en)  » Error after posting
netwerx1

netwerx1
6 posts
---
Location:
n.a.
03.09.2010 05:57

Error after posting

I get this:

Warning: mktime() expects parameter 1 to be long, string given in /home/content/r/e/t/retrojet/html/rock/components/com_discussions/views/thread/tmpl/default.php on line 873

after creating a new post, every time. If I go back to the parent, and then go into the forum thread, the error is no longer there.

The only thing I did was change the date and time format for US in the component parameters.




 
Achim

Achim
1014 posts
---
Location:
Fulda
Germany
Moderator
03.09.2010 10:44

Re: Error after posting

Hi,

I get this:

Warning: mktime() expects parameter 1 to be long, string given in /home/content/r/e/t/retrojet/html/rock/components/com_discussions/views/thread/tmpl/default.php on line 873
after creating a new post, every time. If I go back to the parent, and then go into the forum thread, the error is no longer there.


The function mktime is called when a post is saved. The above message occurs when a post is edited and then saved.
It's a warning that the parametsrs are strings instead of a long int. I will correct that in the code.

For now you could disable warnings on the production site. Backend, Error Reporting None.




The only thing I did was change the date and time format for US in the component parameters.


What are your new params? Is it working correctly with them?


Regards

Achim

Edited by Achim - 03.09.2010 10:45


--
Achim Fischer
Codingfish Limited
www.codingfish.com

 
netwerx1

netwerx1
6 posts
---
Location:
n.a.
03.09.2010 21:36

Re: Error after posting

What are your new params? Is it working correctly with them?



I set it up this way:

%m-%d-%Y displays as 09-03-2010
%l:%i %p displays as 7:23 PM

which is correct in the post heading.

But where it says "edited by", the time displays as Friday:23 p

It's the strangest thing...like it reads strf time format in one area, then reads php time format in another area.




 
Achim

Achim
1014 posts
---
Location:
Fulda
Germany
Moderator
04.09.2010 13:44

Re: Error after posting

Hi,


But where it says "edited by", the time displays as Friday:23 p
It's the strangest thing...like it reads strf time format in one area, then reads php time format in another area.


They are handled a bit differently. Guess I have to change that in the next version.

Quick fix for the "edited by":

open ./components/com_discussions/models/posting.php

at around line 1010 you will find

$_timeformat = str_replace( "%", "", $_timeformat);

just add a line with your time format after this e.g.

$_timeformat = "g:i A";


Then it looks like this:

$_timeformat = str_replace( "%", "", $_timeformat);
$_timeformat = "g:i A";

You could comment out or remove the first line if you like.




Regards

Achim


--
Achim Fischer
Codingfish Limited
www.codingfish.com

 
Forums  » Discussions (en)  » Error after posting

Codingfish operates

italobikes.com
Community for friends of italian motorcycles

fuldany.de
Das soziale Netzwerk für Fulda (im Aufbau)

kiwinity.co.nz
The New Zealand Community (in preparation)

Login