Two complaints and one bugfix

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Two complaints and one bugfix

Post by canuck »

Hi.

I generally like, and appreciate the work you have done.
However, it is yet far from perfect yet :)

There is a bug/typo in admin/record.delcomment.php

Line 24:

Code: Select all

 print "<p align=\"center\">".$PMF_LANG["ad_entry_commentdelsuc."<p><a href=\"".$_SERVER["PHP_SELF"].$linke        xt."&aktion=editentry&id=".$_REQUEST["artid"]."&lang=".$_REQUEST["lang"]."\">".$PMF_LANG["ad_entry_back"]."</a></p>";
 
should be

Code: Select all


 print "<p align=\"center\">".$PMF_LANG["ad_entry_commentdelsuc"]."<p><a href=\"".$_SERVER["PHP_SELF"].$linke        xt."&aktion=editentry&id=".$_REQUEST["artid"]."&lang=".$_REQUEST["lang"]."\">".$PMF_LANG["ad_entry_back"]."</a></p>"; 
this makes it impossible to remove comments, don't know why no one noticed it yet :shock:

I have two more "complains":
  • -- There should really be a way to track which question people make comments, because if you have more than 50 questions, it's impossible to go one by one. My suggestion would in "Edit Records" there would be a note in front of the questions if there were any comments or not in front of each one.
  • -- This one is more serious: When I tried to wipe the whole directory in order to test the new release candidate, I couldn't delete all the files:

Code: Select all


[canuck@host faq]$ ls -alR
total 6
drwxrwxrwx   5 canuck   users        1024 Jul  8 10:37 .
drwxr-xr-x   8 canuck   users        2048 Jul  7 15:14 ..
drwxr-xr-x   2 nobody   nobody       1024 Jul  7 15:16 attachments
drwxr-xr-x   2 nobody   nobody       1024 Jul  8 09:52 data
drwxr-xr-x   2 nobody   nobody       1024 Jul  7 17:51 pdf

attachments:
total 3
drwxr-xr-x   2 nobody   nobody       1024 Jul  7 15:16 .
drwxrwxrwx   5 canuck   users        1024 Jul  8 10:37 ..
-rw-r--r--   1 nobody   nobody        308 Jul  7 15:21 index.html

data:
total 23
drwxr-xr-x   2 nobody   nobody       1024 Jul  8 09:52 .
drwxrwxrwx   5 canuck   users        1024 Jul  8 10:37 ..
-rw-r--r--   1 nobody   nobody        308 Jul  7 15:21 index.html
-rw-r--r--   1 nobody   nobody      19169 Jul  7 21:52 tracking07072004
-rw-r--r--   1 nobody   nobody          0 Jul  8 09:52 tracking08072004

pdf:
total 9
drwxr-xr-x   2 nobody   nobody       1024 Jul  7 17:51 .
drwxrwxrwx   5 canuck   users        1024 Jul  8 10:37 ..
-rw-r--r--   1 nobody   nobody       1581 Jul  7 17:51 5.pdf
-rw-r--r--   1 nobody   nobody       3073 Jul  7 16:43 faq.pdf
-rw-r--r--   1 nobody   nobody        308 Jul  7 15:21 index.html
Of course, I can wipe it with root, but you don't expect everyone has root access :(
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

Oh, and I forgot another thing also, of major importance.

I can only edit the question contents in Mozilla 1.6+ !
Firefox 0.8 and Konqueror can't allow you to edit anything from the body of the question. Is this fixable?
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Two complaints and one bugfix

Post by Thorsten »

Hi,
There is a bug/typo in admin/record.delcomment.php
I fixed it a minute ago. :)
There should really be a way to track which question people make comments, because if you have more than 50 questions, it's impossible to go one by one. My suggestion would in "Edit Records" there would be a note in front of the questions if there were any comments or not in front of each one.
There should be a hint if a entry has a comment.
This one is more serious: When I tried to wipe the whole directory in order to test the new release candidate, I couldn't delete all the files:
This is a mod_php problem.
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

canuck wrote:I can only edit the question contents in Mozilla 1.6+ !
Firefox 0.8 and Konqueror can't allow you to edit anything from the body of the question. Is this fixable?
Konquerer does not support the features used in the editor but Firefox should work. I use Firefox 0.9.1 and it works very well.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

This is a mod_php problem.
It could be usefull to add a save_as_user feature that would make phpMyFAQ do a chmod($myusername,$file); after writing down the pdf file, and everything else so that apache doesn't write everything as its user.
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
canuck wrote:It could be usefull to add a save_as_user feature that would make phpMyFAQ do a chmod($myusername,$file); after writing down the pdf file, and everything else so that apache doesn't write everything as its user.
hm, this won't work, because only the superuser may change the owner of a file: http://www.php.net/manual/en/function.chown.php

This is a usual mod_php problem, sorry. :(

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

hm, this won't work, because only the superuser may change the owner of a file: http://www.php.net/manual/en/function.chown.php

This is a usual mod_php problem, sorry.
I will come back to this in another post.
There should really be a way to track which question people make comments, because if you have more than 50 questions, it's impossible to go one by one. My suggestion would in "Edit Records" there would be a note in front of the questions if there were any comments or not in front of each one.
There should be a hint if a entry has a comment.
Can you tell me where?
I can't find it, maybe if you show me a screenshot, or tell me where it is, I've looked everywhere I presume. If you're referring to tooltip hints, they are the same "edit <question>" on both questions with comments and no comments.


By the way, thanks for being so quick in answering :)
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

here's a screenshot with showing the number of comments:

Image

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

Ok, my bad. It works now. I should have tested from a fresh rc3 install.

Was the db schema updated?
I was updating the test FAQ I was using to test rc2, using the recovery field. It said it wasn't a valid database file. I had to manually insert it (phpmyadmin), and only had an error trying to change the old admin.

Everything seemed to be working fine, except for some XML errors, in "Open Questions":

Code: Select all


XML Parsing Error: mismatched tag. Expected: </th>.
Location: http://www.myhost.com/faq/index.php?sid=1&lang=en&action=open 
Line Number 87, Column 14: <th>&nbsp;</td> 
                   -------------^
I hope the report helps.

I know this is just a release candidate, but I assume you'd like some feedback :lol:

Also, the editing text box works in Firefox 0.9.1, I wasn't using it. Didn't work in 0.8 though.

On another note (a suggestion), I would like to see a custom admin menu acording to the user permissions, and not a global menu and a "Permission Denied" afterwards :)
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,
Was the db schema updated?
I was updating the test FAQ I was using to test rc2, using the recovery field. It said it wasn't a valid database file. I had to manually insert it (phpmyadmin), and only had an error trying to change the old admin.
no, there was no database update. I have to look inside the update script to look for that issue.
Everything seemed to be working fine, except for some XML errors, in "Open Questions":

Code: Select all


XML Parsing Error: mismatched tag. Expected: </th>.
Location: http://www.myhost.com/faq/index.php?sid=1&lang=en&action=open 
Line Number 87, Column 14: <th>&nbsp;</td> 
                   -------------^
The bugfix is here: viewtopic.php?t=865
I know this is just a release candidate, but I assume you'd like some feedback :lol:
Feedback is always great! :)
Also, the editing text box works in Firefox 0.9.1, I wasn't using it. Didn't work in 0.8 though.
hm, when I'm using Firefox 0.8, it worked. Very strange.
On another note (a suggestion), I would like to see a custom admin menu acording to the user permissions, and not a global menu and a "Permission Denied" afterwards :)
yes, that would be better. I'll note it on my todo list.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
canuck
Posts: 39
Joined: Thu Jul 08, 2004 11:58 am

Post by canuck »

-- This one is more serious: When I tried to wipe the whole directory in order to test the new release candidate, I couldn't delete all the files:
This is a mod_php problem.
Coming back to this issue, the attachments/ , pdf/ and data/ get created by "nobody" or "www" if they don't already exist, and put files inside it for several purposes. This particular point makes it impossible to erase it, in case you want to move the whole thing, or actually remove the whole software :lol:

Ways to fix this? Well, It can be minimized if the directories were created by me, the local user, that is, if it came in the zip file. the permission still had to be at least 733, but it would be a little better in this point.

What do you think?
Thorsten
Posts: 15741
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this was the way in 1.3 and there were several problems with mod_php and an enabled safe mode. I hope that the PHP team will fix this stupid issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply