Skip to main content
Topic: [ADDON][beta] Topic Prefix (Read 17978 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Re: [ADDON][beta] Topic Prefix

Reply #45
Another problem with this add-an, @emanuele‍ don't hate me ;D
In topic list, if you select a prefix and there is more than one page of topics with the same prefix, the link to page number is not working
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #46
Still very much a [WIP] but here are some updates ... this is for 1.1 only.  This is for testing and bug feedback only.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #47
Thanks for your help Spuds!
This add-on is getting better, tomorrow I will report a couple of small bugs ;) one is this:
In topic list, if you select a prefix and there is more than one page of topics with the same prefix, the link to page number is not working

 probably "board view" is more appropriate than "topic list"
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #48
Cool ... find them and I'll try to fix them.  The page index is now fixed on my local
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #49
Latest updates, this should have the page issue fixed and added the delete function to the ACP plus some tweaks here and there.  Again 1.1 only

ETA: updated package in follow on posts
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #50
Sorry for the late reply, I had a very busy week. I installed and tested the add-on, here is what I found:
I have this scenario:  10 prefixes, all applied to a few boards.

1.
If I go to a board and select a prefix from the list, I see correctly the first page with filtered topics, but I also get the page number to see other pages. The page number should not be present since there are less than 10 topics with that prefix from that board. If I click on next page I get the other topics with the same prefix but from other boards. 
Here a screenshot, as you can see there are only two topics with selected prefix, and I get seven pages of results.
X

2.
In board view, if I select a prefix from a topic (see the red arrow) I get as results topics from all boards:
X

3.
Imho the links from prefixes should all have the "nofollow" attribute, this is not a bug and I could add it myself. Don't know if this was intended or not.

4.
I get a few errors in Elkarte log:

Guest
Type: Not specified
Notice: Undefined index: view_num_guests
/index.php?action=prefix;sa=prefixedtopics;id=12
/public/themes/default/MessageIndex.template.php
Line: 85

Member
Tipo di errore: Non specificato
Notice: Undefined index: is_first_post
/index.php?action=quotefast;quote=233513;xml;pb=message;mode=0
/public/sources/subs/TopicPrefix.class.php
Line: 55

The second error has "action=quotefast" which could be related to Quick quote add-on https://www.elkarte.net/community/index.php?topic=3456.0

I also see that you corrected some bugs like the prefix not set when editing the first post of a topic and I confirm is working fine. Not tested the red icon "Delete" prefix since it's in my live forum.

Thanks again for watching this add-on Spuds.
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #51
1.
If I go to a board and select a prefix from the list, I see correctly the first page with filtered topics, but I also get the page number to see other pages. The page number should not be present since there are less than 10 topics with that prefix from that board. If I click on next page I get the other topics with the same prefix but from other boards.
Here a screenshot, as you can see there are only two topics with selected prefix, and I get seven pages of results.
[attach type=thumb]6413[/attach]
I could not repo this one ... but I could have been doing things wrong as well.  Please also check your topic_prefix table and make sure there are not duplicate topics, I did see that happen on my local but I thought it was a debug/testing issue.

The only way you should see multiple boards listed is when you select the "Prefix List" from the bread crumbs, for there you can list all topics, across boards, that a prefix was used on.  Once in a board the filtering should be for that board only.
2.
In board view, if I select a prefix from a topic (see the red arrow) I get as results topics from all boards:
[attach type=thumb]6415[/attach]
This should be fixed now
3.
Imho the links from prefixes should all have the "nofollow" attribute, this is not a bug and I could add it myself. Don't know if this was intended or not.
No opinion either way, but I added them ;)
4.
I get a few errors in Elkarte log:

Guest
Type: Not specified
Notice: Undefined index: view_num_guests
/index.php?action=prefix;sa=prefixedtopics;id=12
/public/themes/default/MessageIndex.template.php
Line: 85

Member
Tipo di errore: Non specificato
Notice: Undefined index: is_first_post
/index.php?action=quotefast;quote=233513;xml;pb=message;mode=0
/public/sources/subs/TopicPrefix.class.php
Line: 55

The second error has "action=quotefast" which could be related to Quick quote add-on https://www.elkarte.net/community/index.php?topic=3456.0
The first one should be fixed now


Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #52
There is something wrong with the version you just posted, I got a db error when I try to enter in a board or view a topic, I get a white screen with this message:
Code: [Select]
  Fatal error: Uncaught Elk_Exception: The database value you're trying to insert does not exist: group_list in /....//public/sources/database/Db-abstract.class.php:404 Stack trace: #0 /....//public/sources/database/Db-abstract.class.php(102): Database_Abstract->error_backtrace('The database va...', 'The database va...', 256, '/srv/users/serv...', 1231) #1 [internal function]: Database_Abstract->replacement__callback(Array) #2 /....//public/sources/database/Db-mysql.class.php(180): preg_replace_callback('~{([a-z_]+)(?::...', Array, '\n\t\tSELECT b.id_...') #3 /....//public/sources/Security.php(1231): Database_MySQL->query('', '\n\t\tSELECT b.id_...', Array) #4 /....//public/sources/subs/Moderation.subs.php(250): boardsAllowedTo(Array) #5 /....//public/themes/default/Theme.php(847): loadModeratorMenuCounts() #6 /srv/users/serverpilot/apps/sko in /....//public/sources/database/Db-abstract.class.php on line 404
I removed the full path to my forum

In elkarte log I have:
Type of error: Critical
Database error, given array of integer values is empty. (current_topic)
Function: topicAttribute
/index.php?topic=1688.msg233434;topicseen
File: /sources/subs/Topic.subs.php
Line: 1962

== edit ==
I checked the table topic_prefix and there are no duplicates (exported in csv then checked with Libreoffice Calc)
sorry for my bad english

 

Re: [ADDON][beta] Topic Prefix

Reply #53
Replace your TopicPrefix.class.php file (in subs) with this one and see if that clears it up.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #54
I did, but nothing changed, I got the same error.
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #55
Well that makes no sense .... I protected that function, maybe its some stupid PHP level issue, try this one.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #56
The same problem ::)
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #57
Well TBH at the moment I can't see how that is even possible ... I've removed the package since its broken, but I'm not seeing any errors on my install sooooo I'm at a dead end.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: [ADDON][beta] Topic Prefix

Reply #58
I really don't know ::)
If could be useful, I can setup a test forum, and give you access.
sorry for my bad english

Re: [ADDON][beta] Topic Prefix

Reply #59
I think I found it .... its a stupid error made when editing the MessageIndex.controller.php

Open that file and go to line 714 ... you should see a } ... just delete that as there are 1 to many now.

I've attached a new version which fixes the above error, so uninstall, delete and use this package instead.  It has a couple of the other improvements as well.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.