[Typo3] Errors in tt_news / ve_guestbook combination
J. Michael Adams
jma at oksofar.com
Fri Sep 16 21:20:32 CEST 2005
(from original sender)
Oops. I made a mistake with the configuration specs at the end. Please see
my corrections there.
> -----Original Message-----
> From: J. Michael Adams [mailto:jma at oksofar.com]
> Sent: Friday, September 16, 2005 11:57 AM
> To: jma at oksofar.com
> Subject: dkdk
>
> 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.ph
> p 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
>
>
-------------------
I have discovered that my web host now uses PHP 5.0.4, not PHP 4.4. So I set
up a local configuation with PHP 4.4 on my computer and tried it out.
With PHP 4.4, error #1 no longer appears. That is, the error message at the
top of the page does not appear. However, error 2b is still there.
In other words, with PHP 4 the error is this:
In the single view for a news item, the page looks normal. The news item is
there and the guestbook form is there, and the entry list is there with no
entries in it. However, nothing happens when I submit a comment to the
guestbook.
I looked in the database table named " tx_veguestbook_entries" and found all
the comments that I had entered in my tests. So the comments exist, they
just don't show up in the guestbook on the single view page.
Here are my thoughts about the difference between PHP4 and PHP5. I think
that the array error occurs in both versions, but PHP5 traps it and PHP4
does not. I believe that because when I changed the PHP code to avoid the
error, the behavior of the two versions became identical.
- Michael
More information about the TYPO3-english
mailing list