comic categories on fresh install are not being recognized if changed #47

Open
opened 2010-01-18 06:09:58 +00:00 by Frumph · 4 comments
Frumph commented 2010-01-18 06:09:58 +00:00 (Migrated from github.com)

functions.php is not recognizing the comic category as a comic category on a fresh install even though the comic category is set as comic the comic category the get_all_comic_categories_as_cat_string() is not sending the cats as per set unless storyline in comicpress manager is enabled.

So i'm thinking setting it up on init to find the option isn't enough, but whenever we change the category in comicpress options that it redo this routine:

  $storyline = get_option('comicpress-storyline-category-order');
  $do_rebuild = false;
  if (empty($storyline)) {
    $do_rebuild = true;
  } else {
      $first = array_pop(explode('/', array_shift(explode(',', $storyline))));
      if ($first != $comicpress_options['comicpress_config']['comiccat']) {
        $do_rebuild = true;
      }
  }

so that it's rebuilt when category changes.

functions.php is not recognizing the comic category as a comic category on a fresh install even though the comic category is set as comic the comic category the get_all_comic_categories_as_cat_string() is not sending the cats as per set _unless_ storyline in comicpress manager is enabled. So i'm thinking setting it up on init to find the option isn't enough, but whenever we change the category in comicpress options that it redo this routine: <pre> $storyline = get_option('comicpress-storyline-category-order'); $do_rebuild = false; if (empty($storyline)) { $do_rebuild = true; } else { $first = array_pop(explode('/', array_shift(explode(',', $storyline)))); if ($first != $comicpress_options['comicpress_config']['comiccat']) { $do_rebuild = true; } } </pre> so that it's rebuilt when category changes.
johnbintz commented 2010-01-18 06:25:58 +00:00 (Migrated from github.com)

Since we need the tree of categories regardless of whether or not the storyline option is enabled, I'd rather the check for that option being enabled be removed where it's not absolutely necessary.

Since we need the tree of categories regardless of whether or not the storyline option is enabled, I'd rather the check for that option being enabled be removed where it's not absolutely necessary.
Frumph commented 2010-01-18 13:47:52 +00:00 (Migrated from github.com)

So basically we're not going to rebuild categories when storylines are off when they're changed in the comicpress options?

So basically we're _not_ going to rebuild categories when storylines are off when they're changed in the comicpress options?
johnbintz commented 2010-01-18 14:09:25 +00:00 (Migrated from github.com)

No, that's not what I said at all. What I said was that the "Enable Storyline Support" option in ComicPress Manager is now only used for enabling/disabling any theme UI components that need structured storyline support, as well as allowing the user to reorder categories as necessary. Your original explanation was unclear on this, and I apologize if my response wasn't clear enough.

I would rather do a proper course of debugging on the issue to see why it's not being set within the init section before you decide to run this routine twice, as any change to the comic category should correctly trigger the routine above.

No, that's not what I said at all. What I said was that the "Enable Storyline Support" option in ComicPress Manager is now only used for enabling/disabling any theme UI components that need structured storyline support, as well as allowing the user to reorder categories as necessary. Your original explanation was unclear on this, and I apologize if my response wasn't clear enough. I would rather do a proper course of debugging on the issue to see why it's not being set within the init section before you decide to run this routine twice, as any change to the comic category should correctly trigger the routine above.
johnbintz commented 2010-01-23 17:34:23 +00:00 (Migrated from github.com)

OK, I've done the following:

  • Removed all ComicPress and ComicPress Manager options from the database.
  • Ensure that ComicPress Manager is uninstalled.
  • Create a category structure like this:
Comic
  Chapter 1
    Part 1
  Chapter 2
    Part 2
Blog
Other Category
  • Place at the top of index.php in the theme the following code:
var_dump(get_all_comic_categories_as_cat_string());
exit(0);

Without touching the ComicPress Configuration screen, get_all_comic_categories_as_cat_string() returned:

string '' (length=0)

Going straight to the ComicPress Options page, and changing the Comic category to the newly generated Comic category, get_all_comic_categories_as_cat_string() returned:

string '233,235,232,234,236' (length=19)

I'll need additional information to track down this issue, since I can't replicate it here.

OK, I've done the following: - Removed all ComicPress and ComicPress Manager options from the database. - Ensure that ComicPress Manager is uninstalled. - Create a category structure like this: <pre> Comic Chapter 1 Part 1 Chapter 2 Part 2 Blog Other Category </pre> - Place at the top of index.php in the theme the following code: <pre> var_dump(get_all_comic_categories_as_cat_string()); exit(0); </pre> Without touching the ComicPress Configuration screen, get_all_comic_categories_as_cat_string() returned: <pre> string '' (length=0) </pre> Going straight to the ComicPress Options page, and changing the Comic category to the newly generated Comic category, get_all_comic_categories_as_cat_string() returned: <pre> string '233,235,232,234,236' (length=19) </pre> I'll need additional information to track down this issue, since I can't replicate it here.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/comicpress-2.8#47
No description provided.