bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Tags not separating

(29 posts)
  • Started 1 year ago by Arlo
  • Latest reply from Arlo
  • This topic is not resolved

Tags:

  1. For some reason, when users enter multiple tags in their posts at my bbpress site, they are becoming a SINGLE tag. Is there a way to fix this? Here's a sample post:

    http://automatorworld.com/forum/topic/correcting-exif-data

    "foo bar" was entered in the tag field, but appears as a single tag.

    Posted 1 year ago #
  2. When the post is created, the tags are split on spaces, so foo and bar would have been created as separate tags. When you add tags to an existing topic, you can use spaces and enter tags one at a time. So you would enter foo and get a foo tag, and then bar and get a bar tag. My guess is that 'foo bar' was entered as a tag on an existing topic, and that's how it stayed. If they were expecting the tag to be split on the space (like a new topic handles the tags) they would be surprised maybe to learn it works differently with existing topics.

    Also: http://bbpress.org/forums/topic/472?replies=7

    Maybe?

    Posted 1 year ago #
  3. Thanks, but thats not what's happening. These are all new posts. A user created a new post, enters "foo bar" and "foo bar" becomes one tag.

    Posted 1 year ago #
  4. Yes, that's an interesting oversight; it seems that the tag-adding field when making a new post is comma-delimited in version 1.0-alpha. If of course you're still running 0.81, I have no idea but it might be worth to test the comma delimiting.

    Posted 1 year ago #
  5. I am running the latest alpha...it was switched to commas? Can it be switched back? Spaces I think are much more common a tag method than commas (or can it be hacked to acccept both?)

    Posted 1 year ago #
  6. Ok, I changed line 1255 in functions.php to:

    $words = explode(' ', $tags);

    And this seems to allow both spaces AND commas in new post tags. If there's a better way to do this, I'd like to know :)

    Posted 1 year ago #
  7. I don't know about spaces being more common, but commas make a lot more sense to me - it's a list of items, and you couldn't have tags consisting of more than one word if you use spaces. The reason it accepts commas is, I think, that you add tags like "tag1, tag2", it explodes at the space and when the tag's created the punctuation is removed automatically. Since this function isn't pluggable, there's no more elegant way I know to do this.

    Posted 1 year ago #
  8. I prefer commas too, but I have to say that nearly *every* post at my site has had tags entered with spaces. For whatever that metric is worth. Seeing as my change accepts both, all is good.

    Posted 1 year ago #
  9. I like the commas because some tags require more than one word and commas allow us to do that. Having spaces as the seperator makes it impossible without having to add a dash or something else to create multiple word tags. I was onboard with the commas to seperate before and still +1 on the issue now.

    Trent

    Posted 1 year ago #
  10. For what it's worth, flickr uses quotes for multiple words, so you could enter:
    [foo bar "foobar"] or [foo, bar, "foo bar"] if you like commas. This seems a good way to handle both

    Posted 1 year ago #
  11. I don't understand the system. Spaces are stripped, or alternatively commas are ignored? What's with the square brackets?
    Not that it really matters, I'm just curious about what could be a good system :)

    Posted 1 year ago #
  12. Brackets were just my (apparently needless) way of indicating a text field. Sorry :)
    Flickr works with spaces and quotes, but if you use commas, they are stripped.

    Posted 1 year ago #
  13. I updated to .8.2.1 and this issue isn't resolved; in fact, it's worse. I re-hacked the line to read
    $words = explode(' ', $tags);
    It no longer strips out commas. So a user entering this for tags in a new post:
    "one, two, three four five"

    returns these tags:
    one,
    two,
    three
    four
    five

    Any ideas how to fix this?

    Posted 1 year ago #
  14. $tag = str_replace(',', '', $tag);

    (That's not the actual code you need, just an illustration.)
    You could be doing this with a plugin, which is probably preferable as you don't have to hack the core every time. The filter you want is probably bb_tag_sanitize but I'm not sure. Check http://bbpulp.org/wiki/API/filters and http://bbpulp.org/wiki/API/actions.

    Posted 1 year ago #
  15. Thanks, fel.
    One question-maybe this is stupid, but why do I seem to be the only one with this issue? No one else has users entering a mix of spaces and commas for tags? No one is getting new posts with separate tags as one long tag?

    Posted 1 year ago #
  16. Oh, just noticed this with the new version. Space doesn't seem to separate tags any more.

    Posted 1 year ago #
  17. Whew, I'm not crazy! :)

    Posted 1 year ago #
  18. Tag formatting should be consistent with whatever WordPress does.

    Posted 1 year ago #
  19. Wordpress doesn't have tags...

    Posted 1 year ago #
  20. They're under development. 2.3 will.

    Posted 1 year ago #
  21. Ok, but we're getting off topic. At least one other person has noticed this problem with tag separation, hopefully it can be looked at/addressed?

    Posted 1 year ago #
  22. It's not off topic at all to talk about WordPress. I'm saying that the development of the two products is very much done in parallel, so if a decision is made about how tags should be inputed in WordPress (which is likely at this stage as tags are in development in WP), then that will likely affect the bbPress implementation. Perhaps you will get a better answer asking on the developers mailing list or by submitting a bug report on the Trac site.

    Posted 1 year ago #
  23. I feel the previous post is a spam ....

    I'm also experiencing the "tag is very long when space is not the default parameter".
    If bbPress team still don't want to hear your request, I will perhap's make a plugin to workaround this bug (for me, it is not a feature ...)

    Posted 1 year ago #
  24. I also have a idea why *every* user put tags space separated.
    I my theme, there is a sentence just before the tag text field that tells users to put spaces ...:
    <label for="tags-input"><?php printf(__('Enter a few words (called <a href="%s">tags</a>) separated by spaces to help someone find your topic:'), get_tag_page_link()) ?>
    And I think that in the original kakumei...
    and my translation (in french) also ask user for space separated tags.

    to, you can have a "social" bug-fix of this problem : change the cited line in your theme (file = post-form.php). That "social engineering" !

    Posted 1 year ago #
  25. Yes, the line says "spaces" which adds to the confusion. BBPress touts a feature which doesn't exist!

    Posted 1 year ago #
  26. Has anybody ticketed the incorrect wording?

    Posted 1 year ago #
  27. I would say the wording is correct. It's the feature that needs fixing.

    Posted 1 year ago #
  28. WordPress uses commas to separate tags, so I wouldn't expect this to change back to spaces for the 1.0 release.

    Perhaps mdawaffe can chip in on this one?

    Posted 1 year ago #
  29. Any news on this issue? I'm constantly editing posts where users enter tags with spaces :(

    Posted 7 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.