V2.6.2 : Undefined index: in Category.php
Moderator: Thorsten
V2.6.2 : Undefined index: in Category.php
Hi,
Have a look at these errors, how can it be resolved ? Thank's. Emmanuel.
phpMyFAQ notice [8]: Undefined index: in Category.php on line 777
phpMyFAQ notice [8]: Undefined index: in Category.php on line 778
phpMyFAQ notice [8]: Undefined index: in Category.php on line 779
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 574
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 575
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 576
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 577
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 578
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 579
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 580
Have a look at these errors, how can it be resolved ? Thank's. Emmanuel.
phpMyFAQ notice [8]: Undefined index: in Category.php on line 777
phpMyFAQ notice [8]: Undefined index: in Category.php on line 778
phpMyFAQ notice [8]: Undefined index: in Category.php on line 779
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 574
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 575
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 576
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 577
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 578
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 579
phpMyFAQ warning [2]: Cannot modify header information - headers already sent by (output started at /Data/IMPARTIAL/Web/Public/Client/FAQ/inc/functions.php:173) in index.php on line 580
Re: V2.6.2 : Undefined index: in Category.php
Hi,
how can I reproduce these errors?
bye
Thorsten
how can I reproduce these errors?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: V2.6.2 : Undefined index: in Category.php
reproduction is hard.
I have the same issue. However I wasn't able to create a reliable repro.
It is someone tied to the session of a user. The search term is not as important. I had it with "int" "11" "22".
Most of the time it will go away when you logout and log in again.
Hammering the instant search let the issue appear more often.
It appears to be connected to some articles. For example the int was part of internal error codes, which did not show up in the search at all. While the key words had been "internal error codes". After saving the article again it worked (no change was made .. create a whitespace and deleting it again). However the error stayed for that user for some time.
Restarting apache to wipe the session completely or changing permission level from medium or simple and back did not resolve it ether.
It does show for a split second if you use the instant search backwards. (typing a long word and deleting one character at a time) You can see that the screen changes to the error message and then gets filed with the normal search result.
I can life with missing an article, is there a way to silent the warning?
Cheers,
MNibble
-- we do not use mod rewrite --
I have the same issue. However I wasn't able to create a reliable repro.
It is someone tied to the session of a user. The search term is not as important. I had it with "int" "11" "22".
Most of the time it will go away when you logout and log in again.
Hammering the instant search let the issue appear more often.
It appears to be connected to some articles. For example the int was part of internal error codes, which did not show up in the search at all. While the key words had been "internal error codes". After saving the article again it worked (no change was made .. create a whitespace and deleting it again). However the error stayed for that user for some time.
Restarting apache to wipe the session completely or changing permission level from medium or simple and back did not resolve it ether.
It does show for a split second if you use the instant search backwards. (typing a long word and deleting one character at a time) You can see that the screen changes to the error message and then gets filed with the normal search result.
I can life with missing an article, is there a way to silent the warning?
Cheers,
MNibble
-- we do not use mod rewrite --
Re: V2.6.2 : Undefined index: in Category.php
If I am logged in I can enter 12 in the search and get
9 search results -- which is about right
If I am not logged in. I get
------------------------------------------------------------------------------------
phpMyFAQ notice [8]: Undefined index: in Category.php on line 777
phpMyFAQ notice [8]: Undefined index: in Category.php on line 778
phpMyFAQ notice [8]: Undefined index: in Category.php on line 779
9 search results
However only one will be displayed, which again is correct as without being loggin in the other 8 shouldn't be seen. Just the error should not be displayed.
9 search results -- which is about right
If I am not logged in. I get
------------------------------------------------------------------------------------
phpMyFAQ notice [8]: Undefined index: in Category.php on line 777
phpMyFAQ notice [8]: Undefined index: in Category.php on line 778
phpMyFAQ notice [8]: Undefined index: in Category.php on line 779
9 search results
However only one will be displayed, which again is correct as without being loggin in the other 8 shouldn't be seen. Just the error should not be displayed.
Re: V2.6.2 : Undefined index: in Category.php
A cleaner repro.
Create a new sub category. Use medium permissions. Set some new articles into that category and apply a group to it - not visible for everyone.
Get back to be everyone, just someone that does not have the permission to view it.
Search - try different terms,eventually you will get the error cause the listing (easier to repro with the quick search) would contain FAQs that you are not allowed to view.
As a side note. Those FAQ that are groups based in permissions shouldn't be displayed on the front page to everyone.
Create a new sub category. Use medium permissions. Set some new articles into that category and apply a group to it - not visible for everyone.
Get back to be everyone, just someone that does not have the permission to view it.
Search - try different terms,eventually you will get the error cause the listing (easier to repro with the quick search) would contain FAQs that you are not allowed to view.
As a side note. Those FAQ that are groups based in permissions shouldn't be displayed on the front page to everyone.
Re: V2.6.2 : Undefined index: in Category.php
Hi,
did you tried 2.6.3?
bye
Thorsten
did you tried 2.6.3?
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: V2.6.2 : Undefined index: in Category.php
Not yet, will do in the upcoming week.
Re: V2.6.2 : Undefined index: in Category.php
I still see this issue in the 2.6.4 version.
In my case it appears to be tied to how the categories are configured. I have a top category with 7 sub-categories. One of the Admins changed the permissions on the top category to be locked to a specific group, but all of the sub-categories were open to everyone. Any search that resulted in a FAQ located in one of the sub-categories yielded the error.
Opening the top category back up to everyone has resolved the issue.
In my case it appears to be tied to how the categories are configured. I have a top category with 7 sub-categories. One of the Admins changed the permissions on the top category to be locked to a specific group, but all of the sub-categories were open to everyone. Any search that resulted in a FAQ located in one of the sub-categories yielded the error.
Opening the top category back up to everyone has resolved the issue.
Re: V2.6.2 : Undefined index: in Category.php
Hi,
ah... thanks for the hint... I'll check this behaviour.
bye
Thorsten
ah... thanks for the hint... I'll check this behaviour.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: V2.6.2 : Undefined index: in Category.php
This is still a problem in the current 2.6.6
- create a category visible to everyone
- create another category not visible to everyone and create a sub-category (visible to everyone)
- put an article into both
- log out and display the article -> "Undefined index: in Category.php" error
fix:
- permissions of subcategory must be set to same permissions like parent category
problem with that:
- if you edit that article, permissions of parent category are reset
background:
it should be possible to have articles in both public and restricted categories at the same time
- create a category visible to everyone
- create another category not visible to everyone and create a sub-category (visible to everyone)
- put an article into both
- log out and display the article -> "Undefined index: in Category.php" error
fix:
- permissions of subcategory must be set to same permissions like parent category
problem with that:
- if you edit that article, permissions of parent category are reset
background:
it should be possible to have articles in both public and restricted categories at the same time
Re: V2.6.2 : Undefined index: in Category.php
Hi,
I'll check this issue. Thanks for the good description!
bye
Thorsten
I'll check this issue. Thanks for the good description!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: V2.6.2 : Undefined index: in Category.php
A patch that fixes the warnings is attached.
Note that is is not a real fix.
Normally the title shows:
"Main-category: sub-category: question"
When the user has access to the sub-category and not to the main-category then the title shows
": question"
and 3 warnings are generated.
After the patch the title still shows:
": questions"
but no warnings are generated.
This is a patch based on 2.6.7 since the code changed in HEAD.
Note that is is not a real fix.
Normally the title shows:
"Main-category: sub-category: question"
When the user has access to the sub-category and not to the main-category then the title shows
": question"
and 3 warnings are generated.
After the patch the title still shows:
": questions"
but no warnings are generated.
This is a patch based on 2.6.7 since the code changed in HEAD.
You do not have the required permissions to view the files attached to this post.
Re: V2.6.2 : Undefined index: in Category.php
Hi,
thanks for the patch. It's fixed in 2.6.8 now.
bye
Thorsten
thanks for the patch. It's fixed in 2.6.8 now.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist