alg5 / liveSearch

Live Search (as in Google)
GNU General Public License v2.0
2 stars 3 forks source link

Results page get an error when we click on username in results #13

Closed Galixte closed 9 years ago

Galixte commented 9 years ago

Hi @alg5,

if i click on “Quick search” (live search extension on top of page) to search a username, and if i click on “User posts >In the board”, i have a results page with all messages posted by this user, by example at this adress: http://www.domain.tld/liveSearch/userpost/0/0/2.

Now, if i click on the username in mini profile on right side of a result i get an error page, like that:

General Error
SQL ERROR [ mysqli ]

Unknown column 'memberlist.php' in 'where clause' [1054]

SQL

SELECT count(t.topic_id) as total_count, t.topic_title, u.username FROM phpbb_posts p LEFT JOIN phpbb_topics t ON (p.topic_id = t.topic_id) LEFT JOIN phpbb_users u ON p.poster_id = u.user_id WHERE t.topic_status <> 2 AND t.topic_visibility = 1 AND p.post_visibility = 1 AND p.poster_id = memberlist.php

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/alg/liveSearch/controller/livesearch_ajax_handler.php
LINE: 657
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/alg/liveSearch/controller/livesearch_ajax_handler.php
LINE: 109
CALL: alg\liveSearch\controller\liveSearch_ajax_handler->live_search_userpost()

FILE: (not given by php)
LINE: (not given by php)
CALL: alg\liveSearch\controller\liveSearch_ajax_handler->main()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 117
CALL: call_user_func_array()

FILE: [ROOT]/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
LINE: 61
CALL: Symfony\Component\HttpKernel\HttpKernel->handleRaw()

FILE: [ROOT]/app.php
LINE: 33
CALL: Symfony\Component\HttpKernel\HttpKernel->handle()

This issue is the same on all results page.

Galixte commented 9 years ago

Hi @alg5,

there is an other problem with this page, the links to the topics are not good, by example it's : http://www.domain.tld/viewtopic.php?f=0&t=84 instead of http://www.domain.tld/viewtopic.php?f=11&t=84.

All topics have in their URL the forum ID: ?f=0 instead of the good forum ID.

alg5 commented 9 years ago

fixed

Galixte commented 9 years ago

Hi @alg5,

OK thanks you have fixed for the last error: https://github.com/alg5/liveSearch/issues/13#issuecomment-131936126.

But not for the first post of this issue: https://github.com/alg5/liveSearch/issues/13#issue-101203491. Click on username on this type of page like http://www.domain.tld/liveSearch/userpost/0/0/2 return an error page (see the first post).

alg5 commented 9 years ago

" the username in mini profile on right side of a result" where it? may be on left side? But I receive result when I click

Galixte commented 9 years ago

Je talk about all links to username in those pages, by example: http://domain.tld/liveSearch/usertopic/0/0/2 or http://domain.tld/liveSearch/userpost/0/0/2.

There are results, and all links to the usernames whatever the username have an address like this: http://www.domain.tld/liveSearch/userpost/0/0/memberlist.php?mode=viewprofile&u=2 instead of: http://www.domain.tld/memberlist.php?mode=viewprofile&u=2.

There is the part of address: /liveSearch/userpost/0/0/ which is in too.

alg5 commented 9 years ago

@Galixte, it's very strange, I tested now version from github, I got a good link ( in the firebug) like < a href="./../../../../memberlist.php?mode=viewprofile&u=2" style="color: #AA0000;" class="username-coloured">Алг< /a>, where my page url was http://domain.tld//liveSearch/userpost/0/0/2

please, check your version, may be u'll find difference with the last version

Galixte commented 9 years ago

In Firefox with Firebug and the last snapshot from GitHub i have this:

<a class="username-coloured" style="color: #FF0000 ;" onmouseout="close_popup()" onmouseover="show_popup(2)" href="./memberlist.php?mode=viewprofile&amp;u=2">Galixte</a>
Galixte commented 9 years ago

OK i found the problem, it’s an incompatibility with this extension: https://github.com/tas2580/userinfo.

Your extension is OK, thanks for all, i will contact the author @tas2580.

alg5 commented 9 years ago

Now my ext is not ok. I found the bug. This error occurred only in the last version. If you admin or moderator, you'll find users, but if you simply user, u'll receive error in the userlist. I'll check it tomorrow

Galixte commented 9 years ago

Hi @alg5,

i don’t have any error with a simple user when he searches a user in “Quick search” => “Users:” field.

alg5 commented 9 years ago

Hi, @Galixte, check please, what's the name of one field in Db in the table phpbb_users: allow_pm or user_allow_pm? If the name is user_allow_pm you'll error for simple user, another way u'll get result For me the name is user_allow_pm. May be in the version 3.1.5 this name was changed. I didn't check

Galixte commented 9 years ago

Hi @alg5,

i have user_allow_pm.

Galixte commented 9 years ago

I have doing a search and user_allow_pm is an old field from DB not new.

alg5 commented 9 years ago

yes, it's old, but this error depended from setting for each user. Now it's fixed

Galixte commented 9 years ago

Ok, you will submit to the validation on phpBB.com ?

alg5 commented 9 years ago

validation fixed

Galixte commented 9 years ago

Cool i hope that it will validated. ;)

alg5 commented 9 years ago

ou, I thinked about travis validation :)

Galixte commented 9 years ago

ok ^_^