• Resolved xained

    (@xained)


    Mi Mark,
    Thanks for the great plugins, just what I’ve been looking for.

    I have an issue with bracket builder only producing a slug of -1. I thought it might be that the tournament had a space in the name and some of the fields were empty. But I created several variations on it and they all create the -1 slug.

    Thanks!

    https://www.ads-software.com/plugins/mstw-bracket-builder/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mark O’Donnell

    (@markodonnell)

    Hi xained,
    Bracket Builder uses a slug of -1 in some places as an indicator that the field is empty (no team has been selected for example). Exactly where are you seeing the -1’s ??

    -Mark

    Thread Starter xained

    (@xained)

    Hi Mark,

    Using BB Tournament I create a new tournament, then give it a name (eg test1). I leave all the rest of the settings at default (2 rounds, names all default etc) and publish. Says post published and gives me the option to view post.
    I then go to BB > Edit Tournament
    I select test1 from the drop down list and fill in some details, namely team names and put time on TBA. Then update Game. Reports 3 games updated.

    I then click on Tournaments to view the test1 tournament. The result is below:

    Title Slug Rounds Elimination Schedule Location Group Consolation
    test1 -1 2 Single Manual Not Coded No

    I can’t really see where I’m going wrong as it’s not that complicated. Any help would be greatly appreciated though.

    Cheers

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Ok, thanks for the blow-by-blow description. There’s a bug in the template (some left over test code that works on my test box but not in general). I will post a fix to the development tree on www.ads-software.com today. And update this thread (so you should get notified).

    In the meantime, you can view your tournament by adding the appropriate shortcode to a (test?) page. See this man page.

    Thanks for finding this bug.

    -Mark

    Plugin Author Mark O’Donnell

    (@markodonnell)

    I have modified two files in the development trunk:

    /templates/single-tourney.php to remove the aforementioned text code

    /css/mstw-bb-styles.css to improve the tourney table display

    I believe this resolves the issue.

    -Mark

    Thread Starter xained

    (@xained)

    Hi Mark,

    Thank you for the prompt feedback and the quick fix.
    Unfortunately it doesn’t seem to have worked.

    First part, using the short code, I guessed that it would be the same as the permalink slug (..mstw_bb_tourney/2016-u13/), which worked a treat for 2 of the pages (U13, U15), the second two display the heading but no content. I tried deleting and recreating, but it had the same result. And then I actually looked at the tournament and saw my fields were -1. So you can ignore all that. I’m leaving it in incase someone else finds it helpful.

    Second part, I dropped those files into the relevant locations in the plugins BB folder, replacing the files that were there. That has not had any apparent effect. I’ve recreated the tournaments and modified and resaved them. They still produce the -1 slug.

    With the workaround you gave in part 1 I’ve got what I need to get the bracket working. I’m happy to help test if you would like to squash this bug?

    Cheers

    Plugin Author Mark O’Donnell

    (@markodonnell)

    Thanks.

    First, the proper slug is the last element of the permalink. (It’s on the All Tournaments screen in the next release.) To see it, go to Tournaments admin screen, select a tournament, and look at the permalink. It will look something like:

    https://your-site-url/mstw_bb_tourney/tournament-slug/

    Use only the tournament-slug in the shortcodes.

    As for the -1’s, this is not a problem on the version I’m working on right now. So I backed up a version and when I create a new tournament, then go to Edit it, I do see -1 for each of the team text fields. It’s not a slug, just text. (I will fix that in the next version.) So I change it to what I want, save it, and everything seems to work fine. (??)

    Thanks.
    -Mark

    Thread Starter xained

    (@xained)

    Hi Mark,

    I realized the tournament edit -1s were just text, it was just me not filling everything out.

    The slug shortcode from the permalink is a good workaround.

    Thanks for a great plugin, I look forward to see where you take it in the future!

    Cheers
    M

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Bracket Slug is -1’ is closed to new replies.