[Typo3] Errors in tt_news / ve_guestbook combination

J. Michael Adams jma at oksofar.com
Wed Sep 14 22:07:09 CEST 2005


Hello all,
 
I have a problem combining the guestbook with tt_news. I've searched the
archives and haven't found anything like it. I apologize for the length of
my post - I want to be thorough.
 
I installed tt_news (v2.2.24) and it works fine. I then installed
ve_guestbook (v1.7.5) and followed the directions for using it with tt_news.
This is what the guestbook manual says:
 "Just include a list and a form element on the page with the single view of
the news extension. The comment will be automatically connected to the
selected news item."
 
So I added a form and a list content item to the single view, as instructed.
This almost worked. But I have the following two problems, which appear to
be related.
 
1. When the single view page comes up, the following message appears across
the top of the page:
 Warning: array_merge() Argument #1 is not an array in
...\typo3conf\ext\ve_guestbook\pi1\class.tx_veguestbook_pi1.php on line 840.

I tried to fix this, but it affected the second problem (I'll say more about
this later).
 
2. The guestbook form and list appear on the page, as expected, but the
behavior is weird:
 
    2a. When I enter a comment into the guestbook form and press "Submit",
the news item disappears from the page. In its place is a message that says
"no news_id given". The guestbook entry still appears on the page, and the
list of all comments that I've entered into the guestbook appear on the
page.
 
   2b. If I go back to the main news list and bring up a single view again,
the guestbook list says "Nothing found in the guestbook." But if I enter a
comment and press Submit, the page changes as I mentioned above (item 2a),
and ALL my comment entries do appear.
 
I did one thing to try to fix this. The offending line in the php file was
"$urlParameters = array_merge($urlParameters, $this->tt_news);"
The message says that $urlParameters is not an array. So I changed the line
to:
   if (is_array($urlParameters))     
     $urlParameters = array_merge($urlParameters, $this->tt_news);
   else
     $urlParameters = $this->tt_news;

As you might expect, this stopped the error message at the top of the single
view. However, now when I enter a comment in the guest book and click on the
Submit button, nothing at all happens. 
 
That's where I'm stuck. Any ideas?
 
Here's my configuration:
 
Windows XP
Apache 2.0.54
mySQL 4.1.12a
PHP 4.4 
Typo3 3.8
 
Thank you,
-Michael Adams



More information about the TYPO3-english mailing list