Problem with "Add Content" after upgrade to 1.5.4

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
macnlos
Posts: 17
Joined: Thu Dec 01, 2005 9:48 pm

Problem with "Add Content" after upgrade to 1.5.4

Post by macnlos »

Yesterday I upgraded from version 1.4.8 to 1.5.4. Things were working okay but today I have a weird problem that I can't seem to resolve.

If I click on "Add Content", fill in all the fields, and then click submit I get rejected and the page says that "Required fields are your name, your email address, category, headline and your Record!".

This just started happening today and I can't figure out why. Any thoughts or direction on this? Also, the "Ask Question" function on the site works fine.

For the upgrade process I downloaded the full version of 1.5.4 and removed the templates directory, data.php and config.php based on the instruction for upgrading from 1.4.x to 1.5.x. After that I unzipped the new files over the existing site. I then ran the install/update.php to finish the conversion and database upgrade.

You can find my website at: http://www.ti-994a.com/faq

Thanks,
C.Randolph
Webmaster
macnlos
Posts: 17
Joined: Thu Dec 01, 2005 9:48 pm

Tried replacing my original add.tpl

Post by macnlos »

I saw in another post that the problem seems to be part of "add.tpl". Since the templates directory was not upgraded I replaced my 1.4.8 version of add.tpl with the 1.5.4 version of the file.

The good news is that it works. The bad news is that it looks awful! All the boxes are now out of alignment. I'm sure there is something I'm missing here, it can't be that way still.
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Usually it happens when you miss to fill some fields: within standard 1.5.4 PMF templates it works.
If you look at save.php[ you''l see that the required fields in terms of their HTTP POST KEY names are:

- username
- rubrik
- thema
- content
- useremail

and you have an additional condition upon rubrik: it must be seen as an PHP array. If you look at the original 1.5.4 PMF template/add.tpl you'll see that it is define as:

Code: Select all

    <select name="rubrik[]" id="rubrik" multiple="multiple" size="3">
So, fix your template using name="rubrik[]" :wink: [/b]
macnlos
Posts: 17
Joined: Thu Dec 01, 2005 9:48 pm

All fixed!

Post by macnlos »

Matteo just posted the answer as I just figured it out. The problem was the fact that rubrik needed to by "Rubrik[]" - an array in the new templates. I just saw the difference too because I had a print out of both version and walked through each line.

I took my 1.4.8 template and modified it and now it works!

Thanks,
CR
Post Reply