ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Category links not being generated correctly

July 08, 2007 3:34am

Subscribe [3]
  • #1 / Jul 08, 2007 3:34am

    ShelaghG

    51 posts

    I’ve just bought the full version of EE and done a clean install and imported all my MT entries.  The import created all the correct categories in the Default Category Group and I deleted the ones that were there originally.  The only thing I’ve changed on any template is the “About” information.

    For some reason only one category is displayed in the list in the side bar (and that URL is wrong, I believe it should have the category number in it, eg, C13).  Although the correct category title appears at the bottom of each entry, again the URL is incorrect.  I’ve been having a look at the index template and that section in the sidebar is :

    {exp:weblog:categories weblog="{my_weblog}" style="nested"}
    <a href="http://{path={my_template_group}/index}">{category_name}</a>
    {/exp:weblog:categories}

    At the top of the template I can see that my_weblog is defined as default_site.  I just can’t figure this out!

  • #2 / Jul 08, 2007 6:47pm

    girlwonderful

    54 posts

    can you paste everything that’s in your index template - I actually may be able to answer this one 😊

  • #3 / Jul 08, 2007 10:18pm

    ShelaghG

    51 posts

    It won’t let me post the whole template, too many characters :(  I’ve copied it into the attached file.

  • #4 / Jul 08, 2007 10:35pm

    girlwonderful

    54 posts

    Funnily enough, mine are doing the same thing and it must have something to do with the import because I had an issue and had to import mine as well. When I go to the actual category pages, they render fine - so if someone has any ideas about this, thanks ahead of time.

  • #5 / Jul 09, 2007 9:26am

    ShelaghG

    51 posts

    I’m going round and round in circles on this :(  I’ve tracked entries through the database and can see all the category/entry data in there and it all looks good.

    I’ve created another blog with it’s own set of categories etc and all works fine with that.

    Both sets of templates have exactly the same code to generate the category links!

    I’ve been though the admin settings/preferences and the only odd thing I saw was that the imported categories has no Category URL Title set but having set all these, there’s no difference (I was grasping at straws).

    I’ve written a new post in case it was something funny with the imported ones but the link on that entry is incorrect too - it’s generated as http://www.tripewriting.net/index.php/C/ when it should be http://www.tripewriting.net/index.php/C7/  (which does pull up the correct entries when entered in the browser.

    In the List of Category URLs in the sidebar, only the last category is shown.

    I’m starting to get very frustrated with this :(

  • #6 / Jul 09, 2007 9:37am

    silenz

    1651 posts

    For every entry in the exp_catregories table there must be an entry in the exp_category_field_data table.
    Check if that is the case.

    If not it’s probably due to a bug. If you create those manually everything should work as expected.

  • #7 / Jul 09, 2007 9:39am

    ShelaghG

    51 posts

    I’ve re-posted this in the Tech Support forum.

  • #8 / Jul 09, 2007 9:45am

    ShelaghG

    51 posts

    You’re a Genius!  There were no entries in exp_category_field_data for those particular categories, I have no idea why.  My categories now work perfectly, thank you very much :D

  • #9 / Jul 09, 2007 10:11am

    girlwonderful

    54 posts

    So exp_caegory_field_data should match up to exp_catregories ? I can edit msql - but I just wan to be sure. Thanks 😉

  • #10 / Jul 09, 2007 10:21am

    ShelaghG

    51 posts

    When I looked at the table in my db there were no entries in there for the categories in my main blog, only the entries for the newly created second blog, ie, site_id=1, group_id=2.  I just inserted rows for the missing categories like so:

    cat_id=4, site_id=1, group_id=1

    I did this for the missing categories, which for me was cat_id’s 4-13.  If you look at the categories in EE’s Control Panel (Admin/Weblog Administration/Category Management then Add/Edit categories of the relevant group) you will see the cat_id in the 1st column.

  • #11 / Jul 09, 2007 10:43am

    silenz

    1651 posts

    There was a bug in the very first build of EE 1.6 that lead to exp_category_field_data not being properly populated.
    If you haven’t already done so, you should update to the latest build.

    @helloandgoodbye

    Yes.
    If the number of entries in exp_categories is higher than the number of entries in exp_category_field_data something is fishy.

  • #12 / Jul 09, 2007 12:55pm

    ShelaghG

    51 posts

    Discussion is ongoing here http://ellislab.com/forums/viewthread/56068/  I had downloaded the latest build, the problem didn’t affect new categories, just the ones created on importing my MT file.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases