Page 1 of 1

'There is no public post yet' message at frontend

Posted: 11 Dec 2014, 19:07
by carsten888
I just migrated to j3. At the frontend I get this message:
There is no public post yet
On the page is the form to post a guestbook entry.

I have set messages to show in the 'options' ACL settings and also in the menu-item settings, but they just don't show up at the frontend. They are visible at the backend, and are connected to the correct catid of the book.

What am I overlooking here?

Re: 'There is no public post yet' message at frontend

Posted: 12 Dec 2014, 00:59
by Jan
Hi, hmm, are the posts published - is set in Options that the posts should be displayed. See the parameter "report function" - is this disabled? This should be disabled because when Phoca Guestbook works like report component, the posts are not displayed.

See the html code of the site too, maybe the posts are there but somehow hidden by html or css style?

Jan

Re: 'There is no public post yet' message at frontend

Posted: 12 Dec 2014, 09:19
by carsten888
yes, the posts are published & options that the posts should be displayed.
the parameter "report function"
where is that? I checked category settings, menu-item settings and options.

No posts in the html output. No template overrides.

auw! Its not loading the posts at all. In the guestbook view line 101 I added this to check for output.

Code: Select all

$items		= $this->get('Data');
		print_r($items);
which displays an empty array. So maybe this import script, I used to import all the posts, is not complete.
viewtopic.php?f=2&t=25723&sid=4aafc15ae ... 0c9#p96972

Re: 'There is no public post yet' message at frontend

Posted: 12 Dec 2014, 09:38
by carsten888
I got it.

In the options the default pagination was set to 'all'. Which was imported from joomla 2.5. 'all' is used as the limit in the guestbook model line 285

Code: Select all

$limit  = JRequest::getInt('limit', $this->getState('list.limit', $params->get('default_pagination')));
but as an int returns 0, so limit in the query is 0,0, so no output at all :|
I changed the limit to 9999 because I want all posts on one page, and that solved the issue.

So if you are going to make an update/import script, make sure that param is set to a number not 0. (On a default fresh install that is 5).

Re: 'There is no public post yet' message at frontend

Posted: 12 Dec 2014, 13:49
by Jan
Ok, thank you, so this means, the initialization of the default_pagination is missing, it should be:

$limit = JRequest::getInt('limit', $this->getState('list.limit', $params->get('default_pagination', 5)));

(in case there is zero, set the default to 5)

Thank you, I will take a look at it for the next version.

Jan