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
Error Deleting Forum Ranks
Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 1:23 pm

I am trying to remove my forum ranks, by hitting the delete button. There is a conflict, but even after deactivating every Plugin except forum, I get the following error.

DeleteForumRanksError.JPGImage Enlarger

That being said, I am pretty good in SQL and see the ranks, in sf_Meta. If I delete them, in fact the ranks are gone in the Forums Rank section, but in the Forum display under each users icon is the word "Member" where the rank name would be. Where in meta data is that world "Member" coming from. Note Member (Not Members User Group Name).

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 3:12 pm

yes, unfortunately, this is a known issue in the current version... its been fixed in the next release which we had hoped for 1st of year, but likely delayed until February...  Its a simple fix and I can give you a code change for it...

in wp-content/simple-press/admin/panel-components/forms/spa-components-forumranks-form.php, look for this line of code

<img class="spDeleteRow" data-url="'.$site.'" data-target="rankbadge'.$x.'" src="<?php echo SPCOMMONIMAGES; ?>delete.png" title="<?php SP()->primitives->admin_etext('Delete Rank'); ?>" alt="" />

and change it to

<img class="spDeleteRow" data-url="<?php echo $site; ?>" data-target="rank<?php echo $x; ?>" src="<?php echo SPCOMMONIMAGES; ?>delete.png" title="<?php SP()->primitives->admin_etext('Delete Rank'); ?>" alt="" />

if you found the forum ranks in the db, you should see the name...  they are found in the sfmeta table...  one row per rank...  the rank name is the meta_key column of the row...

Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 4:14 pm

Like you mentioned, it was no problem finding the rank in the DB and deleting them. That takes care of them showing up as ranks in the Forum management pages. But as mention in the initial message, there is a display problem in Reboot Theme as under the users avatar, it will say "Member" instead of displaying nothing.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 5:35 pm

Guess I didn't catch that from the original post but your clarification sheds a bit more insight. If I follow now, are you saying the rank is still displaying? If so wont be a reboot issue but a cache issue. Since you manually deleted from db you likely corrupted the cache. Or rather invalidated it. Try going to forum - tollbox - housekeeping and clearing the user plugin cache... 

Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 6:28 pm

Its not a caching problem, I already cleared the forums cache, and user cache. I do not use any plugin caches in the forum pages....

It is not displaying the old rank names - they had long names like "Forum SuperHero", it is physically displaying the word "Member". See screen shot.

RankErrorDisplay.PNGImage Enlarger

 

If I recreate a few forum ranks, then the word "Member" gets replaced with the Rank Name.

Just added: I checked another Simple Press Forum I have on another site, and it shows the exact same word "Member". That site has never had Ranks. Also tried changing theme to Unified.

https://canvascampers.com/forum

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 8:03 pm

couple things...

not sure what you mean by forums cache unless you are using a generic term for the various caches listed on the housekeeping page... by users cache, do you mean the button Reset User Plugin Data??

have you verified that you deleted all rows in sfmeta with a meta_type of forum_rank? there will be multiple...

Member is the default rank you get at install... all simple press installs use forum ranks by default... only way to not use them is to delete them so not sure I follow never used forum ranks...

I assume you are not using special ranks either?

thanks for the site url, but afraid it doesnt help much since we dont have any real access...   you mentioned being comfortable in the db...  can you do a search for the word member and see where you find it?  the tag you show in the image appears to be the forum rank, but we dont use member like that in core anywhere other than the default forum rank at install...

Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 8:21 pm

Yes, cleared ALL SP forum related caches, as well as resetting Combined CSS. As noted also, I see this on another forum on another site I manage.

 

I think you just hit on the answer in that you said that on all installs forum ranks are installed by default. In both of my sites, I have deleted the default ranks. Possible that the code has a place holder for that Rank and since I can't find one, it outputs Member.

A quick test, I added 2 ranks, Member changes to the name of the rank. Deleted the 2 ranks, goes back to the word Member.

Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 8:30 pm

I think with the fast look I just made is the answer is in:

spTopicViewDesktop.php

with this line: sp_PostIndexUserRank('tagClass=spPostUserRank spCenter&showBadge=1&hideIfSpecialRank=1'); 

Should there also be a hide if Ranks are undefined?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 26, 2017 - 10:00 pm

well, turns out you are correct...  didnt remember that far hidden away from code from the early 4.x days...  but yes, if there are no forum ranks than instead the default user type is output...  so that would be Admin, Moderator, Member or Guest...

so if you dont want to display the forum rank (or user type), you would need to remove that template tag call you mention if post #8..  delete it or comment it out...  first, would recommend making a child theme so you dont lose your changes on updates...  also, dont forget to edit the mobile topic view template file if you are using the mobile theme capability...

thanks for pointing me in the right direction! 😉

Avatar
Phil Gordemer
Member
Free Members
sp_UserOfflineSmall Offline
Dec 27, 2017 - 9:12 am

Thanks.... so it shows we are both not crazy eek

Looks like it might be slightly deeper. I notice that if there is a location defined in their profile, it replaces the "Member" tag also. So I might be able to "fix" it by chiding the forum users to update their profile.

I already have a child theme going, but let me progress further. If I find more related, I will post the code.

P.S. How is the search for a new owner of SP going.

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: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625