[CDB] RH Topic Tags

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
leschek
Registered User
Posts: 856
Joined: Tue Jul 18, 2006 12:49 pm

Re: [DEV] Topic Tags

Post by leschek »

Really nice update. Thanks for your work.
While testing I found some small issues:

1. in ACP settings - Explanation for Users - make translatable the new part "spaces (will be converted to -)" and change in language file the old "default: 0-9, a-z, A-Z, min: 3, max: 30" into new "default: -, 0-9, a-z, A-Z, spaces (will be converted to -), min: 3, max: 30" (note - I guess it's new default). Not sure how hard it would be to add, but it would be great if changing option "Convert " " to "-":" would also change the "Explanation for Users" field. I mean if option "Convert " " to "-":" is set to "Yes" it will show in "Explanation for Users" the part "(will be converted to -)" and if "Convert " " to "-":" is set to "No" it will not show that part.

2. I have problem with option "Regular Expression for allowed tags". As I wrote here I would like to use in the tags all letters of my alphabet and dots. I already figured dots "\.", but I'm not able to add Czech letters. For example I tried to change the regular expression into this /^[\-\. a-zšč0-9]{3,30}$/i (I added there "š" and "ž" characters) and when I submit it it was changed into this: /^[\-\. a-z????0-9]{3,30}$/i (characters I submit were changed into the question marks). I'm not sure if it is bug or if I'm adding it incorrectly, but it make the extension almost unusable, because I can't add tags in my language.
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

leschek wrote:Really nice update. Thanks for your work.
Good to hear! Consider donating / buying me a berr over my blog: http://blog.robert-heim.de .

Regarding 1) Thanks, I will update the defaults and make it translateable (so while installing the extension, the current board-default lang can be used for setting the config parameter for the first time), but I will not implement the auto-explanation for the »convert " " to "-"«. Only people skilled in regex should modify these parameters and I require them to know what they are doing - so they easily can update the explanation as well, while implementing it is much work without a real value. I think the »NOTEs« in ACP contain enough information for admins to deal with the regex configuration (and they only need to do this once and dont need to ever touch it again).

Regarding 2:
This is not an issue of the extension , but a question regarding PHP's preg_match(...). Try describing the characters by its unicode properties ( http://php.net/manual/en/regexp.reference.unicode.php ). If that does not work try google or ask stackoverflow. As far as I know there also might be differences in behaviour depending on the php version used. solved in 0.0.10-DEV
Last edited by combuster on Tue Oct 07, 2014 6:50 pm, edited 1 time in total.
leschek
Registered User
Posts: 856
Joined: Tue Jul 18, 2006 12:49 pm

Re: [DEV] Topic Tags

Post by leschek »

OK. Thank you for explanation.
combuster wrote: Only people skilled in regex should modify these parameters and I require them to know what they are doing
Wouldn't be more user friendly to use something like the option "Limit username chars" in "User registration settings" (ACP - Board configuration). I guess it does the same thing as for normal non-programmer user too complicated regex. Or would be possible to disable the regex and use any character?
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

For any character use this regex: /(.*)/i


I will see if I can convert special chars to Unicode automatically and I will see if I add more user-friendly tag definition options. You are right..its important..I just dont have so much time...
leschek
Registered User
Posts: 856
Joined: Tue Jul 18, 2006 12:49 pm

Re: [DEV] Topic Tags

Post by leschek »

combuster wrote:For any character use this regex: /(.*)/i
Thank you. It's working now.
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

@leschek: I just fixed the character-encoding problems. It was my fault! Czech characters (and all other multibyte characters as well) will work within the regex in the next release! (BTW: explanation for users, whitelist and blacklist suffered from the same issue that non ASCII characters were converted to "?" before 0.0.10-DEV)

Oh and THX for buying a beer!! :) Image
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

I updated the first post for 0.0.10-DEV release containing bug-fixes (especially full utf8 support for special characters).
leschek
Registered User
Posts: 856
Joined: Tue Jul 18, 2006 12:49 pm

Re: [DEV] Topic Tags

Post by leschek »

Great news. I will try it soon. It seems, that I accidentally find possible bug (in 0.0.9-DEV). I have small problem with UCP (more on Area51), so I was testing if I can change signature in UCP. When I changed it I wanted to try it, but in the topic I opened the signatures were disabled (and forum with this topic is locked, but I have rights to edit topics there). I enabled it and when I submitted the topic I got this message:

Code: Select all

Fatal error: Uncaught exception 'Symfony\Component\Routing\Exception\InvalidParameterException' with message 'Parameter "tags" for route "robertheim_topictags_show_tag_controller" must match "[^/]++" ("" given) to generate a corresponding URL.' in /xxx/yyy/zzz/forum1_phpBB31/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php:167 Stack trace: #0 /xxx/yyy/zzz/forum1_phpBB31/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php(140): Symfony\Component\Routing\Generator\UrlGenerator->doGenerate(Array, Array, Array, Array, Array, 'robertheim_topi...', false, Array) #1 /xxx/yyy/zzz/forum1_phpBB31/phpbb/controller/helper.php(158): Symfony\Component\Routing\Generator\UrlGenerator->generate('robertheim_topi...', Array, false) #2 /xxx/yyy/zzz/forum1_phpBB31/ext/robertheim/topictags/service/tagcloud_manager.php(90): phpbb\controller\helper->route('robertheim_topi...', Array) #3 /xxx/yyy/zzz/forum1_phpBB31/ext/roberthe in /xxx/yyy/zzz/forum1_phpBB31/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php on line 167
There is mentioned your extension, so I'm sending it here.

Now I see this message everywhere, except UCP and ACP (and probably MCP).

I disabled your extension and I can enable the signature without problem.
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

@leschk:
Can you confirm the problem on a clean new phpBB3.1 (RC4) installation, without any extensions and then only installing Topic Tags 0.0.10-DEV?

Please note that this extension is marked as DEV, which means, that you never should use it in a production board, but only for testing the extension to get an idea of it. This is why the releases are marked as "pre-release". This is because there might be braking changes from release to release. Furthermore, this is why you CANNOT update the extension by disabling, overriding files and enabling it again. You need to disable it, completely delete any data (including files) and then copy files and enable it again. If you have not done this always, than you need to setup a new phpBB3.

As long as this error is not confirmed in a clean install of phpBB3 with then installing 0.0.10-DEV I can't help.

EDIT: Actually, I was able to re-create the issue. Please provide dump of DB table rh_topictags_tags
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

hmmm I am not sure if url-encoding the tags is the best idea... it might solve your problem, but bad about url-encoding is that some tag-urls might not be readable, e.g. tag "täg" would look like "t%C3%A4g" - even though "täg" would be fine.

hmm for now a limited regex (eg standard alphanumeric and numbers like the default regex) and deletion of invalid tags (see ACP option for pruning invalid tags) should quick-fix your problem.
User avatar
Raul [ThE KuKa]
Style Customisations
Style Customisations
Posts: 11137
Joined: Mon Dec 08, 2003 9:24 pm
Location: Spain
Name: Raul Arroyo

Re: [DEV] Topic Tags

Post by Raul [ThE KuKa] »

Spanish translation updated to 0.0.10-DEV

"PR" ready Robert. :wink:
All unsolicited PMs will be ignored.
:warning: Knowledge Base | Documentation | Board rules | phpBB Styles Rules & Policies | Styles Queue Stats :warning:


If you like my styles, translations, etc. and want to show some appreciation, then feel free to Donate.
:flag_es: phpBB Spain - Online Since 2003 :heart:


combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

@Raul: merged =)

@leschk: see https://github.com/RobertHeim/phpbb-ext ... /issues/32 I closed it using urlencode.

using a tag "üüü" will result in such (safe!) urls: tag/%25C3%25BC%25C3%25BC%25C3%25BC
That is bad for readability, but safe. And the good thing is, that the following url still works if entered by hand: /tag/üüü
FomenkoAndrey
Registered User
Posts: 369
Joined: Thu Aug 19, 2010 10:44 am

Re: [DEV] Topic Tags

Post by FomenkoAndrey »

try to make russian translate for u
combuster
Registered User
Posts: 352
Joined: Sun Oct 26, 2008 11:58 pm

Re: [DEV] Topic Tags

Post by combuster »

@FomenkoAndrey: NICE! :)

@all: 0.0.11-DEV fixes the url issues (see first post for download urls)
leschek
Registered User
Posts: 856
Joined: Tue Jul 18, 2006 12:49 pm

Re: [DEV] Topic Tags

Post by leschek »

combuster wrote:Can you confirm the problem on a clean new phpBB3.1 (RC4) installation, without any extensions and then only installing Topic Tags 0.0.10-DEV?
No, on a clean new phpBB3.1 (RC4) I can't replicate the problem.
combuster wrote:Please note that this extension is marked as DEV, which means, that you never should use it in a production board, but only for testing the extension to get an idea of it. This is why the releases are marked as "pre-release". This is because there might be braking changes from release to release. Furthermore, this is why you CANNOT update the extension by disabling, overriding files and enabling it again. You need to disable it, completely delete any data (including files) and then copy files and enable it again. If you have not done this always, than you need to setup a new phpBB3.
Right. I'm testing it on the test board. I just duplicated database of an old forum and updated it into phpBB 3.1 to see potential error and problems, so I would know if I can update my working forums into phpBB 3.1 or not. I can also give a feedback to developers, because I'm testing their extensions in different environment then they do, so I could run into problems not visible on clean phpBB.
I'm updating extensions as is written in ACP (I didn't delete the data of extension, because I was lazy to create testing tags again - but I deleted the files and uploaded new one) and it was working for me until this problem with signature.

I update the extension into Topic Tags 0.0.10-DEV, deleted the data and it seem to work OK even on forum affected before, and so far I wasn't able to replicate the problem.
combuster wrote:EDIT: Actually, I was able to re-create the issue. Please provide dump of DB table rh_topictags_tags
I deleted the data of the extension just before I saw this.
combuster wrote:@all: 0.0.11-DEV fixes the url issues (see first post for download urls)
You are fixing issues faster than I'm able to write this post. :D

Return to “Extensions in Development”