Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Website Loads Inside SP Admin
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 21, 2018 - 5:03 pm

Yes - I can not replicate either...

Perhaps you could try adding a second line as

return '';

- That is two single quotes NOT a double quote.

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 21, 2018 - 5:15 pm

Yellow Swordfish said
Perhaps you could try adding a second line... 

The query still does not display.

Am I doing something wrong here?

Any other way to generate the query, that I might be able to plug into phpMyAdmin to see what errors it might throw there?

vshow-return.pngImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 21, 2018 - 5:45 pm

Okay...I used PROCESSLIST to capture the query, and ran it in phpMyAdmin with no errors. Though I'm not certain about that "unique column" warning.

 

SELECT SQL_CALC_FOUND_ROWS DISTINCT
 wp_1_sfmembers.user_id, display_name,
 (SELECT GROUP_CONCAT(item_id) FROM wp_1_sfuseractivity WHERE type_id=6 AND wp_1_sfuseractivity.user_id=wp_1_sfmembers.user_id) AS topics
 FROM wp_1_sfmembers
 JOIN wp_1_sfuseractivity ON wp_1_sfmembers.user_id = wp_1_sfuseractivity.user_id WHERE item_id IS NOT NULL AND type_id = 6 ORDER BY wp_1_sfmembers.user_id DESC LIMIT 0, 20

I also presume it's only returning 20 results, since that is the number of entries listed on the admin page. We surely have many more users who have subscribed to topics.

This shed any light on my mystery?

phpmyadmin-usersub-query2.pngImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Mar 21, 2018 - 8:22 pm

not sure why you are getting the unique column warning...  nothing looking odd there...

you get 20 records because of the query, in particular, the part at the end that limits the number of records...   Limit 0, 20...  so you could get more if you wanted...

its possible you are not seeing the output because its output in the page header or elsewhere before the html display... you could look at the page source and see if you see it in there...

are you just looking for one specific user?  you could change this in the php code

WHERE item_id IS NOT NULL AND

to

WHERE wp_1_sfmembers.user_id = xxx AND item_id IS NOT NULL AND ....

changing xxx to the user_id you want to see subscriptions for...

or perhaps more simply, in phpmyadmin, just query this

select * from wp_1_sfuseractivity where user_id = xxx AND type_id = 6 

and it will list any subscriptions this user has...

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Mar 22, 2018 - 1:10 am

Thanks for this @mr-papa .

That will come in handy if/when I actually need to review user subs.

At this point I'm much more concerned about what may be causing the site to load inside the admin pane, and what other havoc that may be causing.

For whatever reason, I am now seeing the query, and the form loads properly when I add this:

vshow($query);
 return '';

The query, however, returns no results when searching for a username that has known subscriptions as shown of the Topic Subscriptions tab.

My guess is something odd still going on with that query. Any thoughts on how I might troubleshoot that are appreciated. Web console revealed nothing.

purrkins-user.jpgImage Enlargerpurrkins-topic.jpgImage Enlarger

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Mar 22, 2018 - 3:23 am

With those 2 lines of code in place the query will return no data. The purpose of the code was simply to try and extract the sql statement itself. You should now remove them as you have proven that the query is not at fault by running it in phpMyAdmin.

I must also stress that no 'havoc' is being caused. No data is being changed, moved or removed.

The next thing to look into is the url being generated. I  do not know which browser you are using but you should be able to open the browser console and select/turn on the 'XHR' tab only. Again - open the admin users section from the main menu and then chose the subs by user.

This should display the base url by displaying a GET statement in the console. Further tabs should enable you to view the Headers, Cookies, Params etc. We could do with taking a look at the headers section and Params section.

The terminology here comes from the Firefox browser so perhaps using that for this might be the best thing to do.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 647
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79596