1.3.14 - Cannot EDIT record

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

itechusa
Posts: 2
Joined: Thu Jun 10, 2004 6:34 am
Location: New Orleans, LA
Contact:

1.3.14 - Cannot EDIT record

Post by itechusa »

After a clean install of 1.3.14, everything works good, including the slight template changes to maintain the theme with our website.

I created a few entries and then found a few spelling errors in record 2, and needed to go back and edit.

When I click the record name from the "Edit Record" from the admin menu, it takes me to the form, but the fields are not populated from the database with my text.

This is the first time I have ever used phpMyFAQ, and it looks to be the best FAQ I have found. So I want to keep using it. Is this a KNOWN problem or an easy fix?

my url = http://help.nolaserve.com/faq/

Danke!
ITechusa Networks
-- Home of NOLASERVE.COM
Danielmc
Posts: 6
Joined: Thu Jun 10, 2004 8:59 am

I'm having the same problem

Post by Danielmc »

itechusa wrote:After a clean install of 1.3.14, everything works good, including the slight template changes to maintain the theme with our website.

I created a few entries and then found a few spelling errors in record 2, and needed to go back and edit.

When I click the record name from the "Edit Record" from the admin menu, it takes me to the form, but the fields are not populated from the database with my text.

This is the first time I have ever used phpMyFAQ, and it looks to be the best FAQ I have found. So I want to keep using it. Is this a KNOWN problem or an easy fix?

my url = http://help.nolaserve.com/faq/

Danke!
I am having the same problem.
I have found that nothing is displayed in the editing fields of the admin section when:

I try to edit an entry I created
When ging to approve a submitted FAQ
When a user answers another user's question and I try to add it to the FAQ.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I'll test it and look for an bugfix.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I found the bug and will update the download versions. Please download the new version and change the file admin/record.edit.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
itechusa
Posts: 2
Joined: Thu Jun 10, 2004 6:34 am
Location: New Orleans, LA
Contact:

Post by itechusa »

Bitte!

Here is a patch I created from the diff of the file: faq/admin/record.edit.php on the original date 06/09/04 to the one updated by Thorsten on 06/10/04

You dont really need to use this patch because the downloadable archive has already been updated, but for those of us who like this kinda stuff, here it is.

Code: Select all


--- faq/admin/record.edit.php   Fri May 28 19:20:22 2004
+++ new/admin/record.edit.php   Thu Jun 10 11:53:16 2004
@@ -82,9 +82,9 @@
        if (isset($_REQUEST["id"])) {
                adminlog("Beitragedit, ".$_REQUEST["id"]);
                if (empty($rubrik) AND empty($thema)) {
-                       $result = $db->query("SELECT id, lang, active, rubrik, keywords, thema, content, author, email, comment, datum FROM ".$sqltblpre."faqdata WHERE id = '".$_POST["id"]."' AND lang = '".$_POST["lang"]."'");
+                       $result = $db->query("SELECT id, lang, active, rubrik, keywords, thema, content, author, email, comment, datum FROM ".$sqltblpre."faqdata WHERE id = '".$_GET["id"]."' AND lang = '".$_GET["lang"]."'");
                        list($id, $lang, $active, $rubrik, $keywords, $thema, $content, $author, $email, $comment, $date) = $db->fetch_row($result);
-                       $acti = "saveentry&id=".$_REQUEST["id"];
+                       $acti = "saveentry&id=".$_GET["id"];
                        $id = $_REQUEST["id"];
                        }
                else {

Thorsten, thanks for the quick fix. If I spoke better German, I'd post in the bug tracker.
ITechusa Networks
-- Home of NOLASERVE.COM
Danielmc
Posts: 6
Joined: Thu Jun 10, 2004 8:59 am

Thanks - Works good

Post by Danielmc »

Thanks for the quick update. It works great.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you're welcome and thanks for posting the little patch file. :)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maui1
Posts: 6
Joined: Sun Feb 22, 2004 8:24 pm

I just noticed this same problem in the Edit News fields

Post by maui1 »

I just installed the latest 1.4.1 release and can enter and edit records but when I try to edit an existing News item, the content field is blank.

I have checked this against both the WYSIWYG edit area and the non WYSIWYG edit area on both windows and macs, with the same result.

Could this be a similar problem to the one addressed in the comments above?
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I checked your issue on my test box and it works for me.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
maui1
Posts: 6
Joined: Sun Feb 22, 2004 8:24 pm

Hmmm curious

Post by maui1 »

I just checked to duplicate the problem and it still exists on all my client side machines, windows and macs.

Could it be something on my server settings?

When I edit a News item I get a blank content field, and if I add anything to that field and save it, it replaces the original content for that News item.

I notice a slight difference in the layout between Edit Record and Edit News. In the Edit Record you click on the title of the record and in Edit News you click on the little edit icon next to the title. Are the queries handled differently.

I set up an account for you if you want to check on my site:

user name: Thorsten
Password: Thorsten
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

give me some days to do that. I'm quite busy at work at the moment.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
fbaligant
Posts: 2
Joined: Tue Aug 24, 2004 7:40 pm

Re: Hmmm curious

Post by fbaligant »

maui1 wrote:I just checked to duplicate the problem and it still exists on all my client side machines, windows and macs.

Could it be something on my server settings?

When I edit a News item I get a blank content field, and if I add anything to that field and save it, it replaces the original content for that News item.

I notice a slight difference in the layout between Edit Record and Edit News. In the Edit Record you click on the title of the record and in Edit News you click on the little edit icon next to the title. Are the queries handled differently.

I set up an account for you if you want to check on my site:

user name: Thorsten
Password: Thorsten
Same problem here on a brand new installation of PHPMyFAQ 1.4.1. When editing articles, the field are not populated.

Apache 2.0.50 and PHP 4.3.8
maui1
Posts: 6
Joined: Sun Feb 22, 2004 8:24 pm

No Rush

Post by maui1 »

Thanks again for your assistance. I am on the road for the next few days and it is not an urgent matter at all. Just really curious what might be happening with this issue.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I might have an idea and I want to test it the next days.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Hyperman
Posts: 2
Joined: Wed Sep 01, 2004 5:46 pm

Post by Hyperman »

Hi all,

This is my first try of a FAQ system and then also the first with phpMyFAQ. It's really cool !!
Thanks for this great job.
I just play with phpMyFAQ today. I just know a little of php but wanted to make it work.

About the problem of non displaying "Added content" for approval, I found that the SQL
request was empty due to bad language checking.
The problem is due to bad language saving when a user add content.

In "index.php" from line 32 to 37 there is the following code :

Code: Select all

    if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
        $lang = trim(strtolower(substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2)));
    }
    else {
        $lang = "en";
    }
The "$lang" variable is correctly set before but always become "en" after.

Commenting those lines solves the problem.

I don't know if this is the right way to make it run but maybe this could be a hint to find
the real problem.

Hope this help,
Philippe
Post Reply