CGBlog Browse Category path problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
johnflan
Forum Members
Forum Members
Posts: 28
Joined: Thu Aug 23, 2007 5:20 pm

CGBlog Browse Category path problem

Post by johnflan »

I'm using CGBlog which is great but in the browse category listing the links created for all the categories includes the extra "admin/" and so of course takes you to the admin login page.

For example
"http://s773115261.websitehome.co.uk/bac ... s_cmssite/admin/index.php?mact=CGBlog,cntnt01,default,0&cntnt01browsecattemplate=Sample&cntnt01category_id=3&cntnt01returnid=0"

Has anyone got a fix for this please? Or an idea about where I need to look to sort it out.

I'm using the CGBlog browse category template "Sample".

Code: Select all

{* original browsecat template *}
{function cgblog_browsecat}
<ul>
  {foreach $categories as $cid => $rec}
    <li>
      {if $rec.count > 0}
      <a href="{$rec.url}" title="{$rec.name}">{$rec.name}</a>&nbsp;<em>({$rec.count})</em>
      {else}
        <span>{$rec.name}</span>&nbsp;<em>({$rec.count})</em>
      {/if}
      {if isset($rec.children)}
        {cgblog_browsecat categories=$rec.children}
      {/if}
    </li>
  {/foreach}
</ul>
{/function}

{cgblog_browsecat}
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1079
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBlog Browse Category path problem

Post by DIGI3 »

I wasn't able to recreate this behaviour, I tried various combinations of pretty and non-pretty urls. I would suspect it's something in your config.php or .htaccess causing it.
Not getting the answer you need? CMSMS support options
johnflan
Forum Members
Forum Members
Posts: 28
Joined: Thu Aug 23, 2007 5:20 pm

Re: CGBlog Browse Category path problem

Post by johnflan »

Tried using .htaccess basic and as in the doc folder and also not using it at all and no change to the path.

The config file is basic.

Code: Select all

<?php
# CMS Made Simple Configuration File
# Documentation: https://docs.cmsmadesimple.org/configuration/config-file/config-reference
#
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'xxxxxxxxx;
$config['db_username'] = 'xxxxxxxxx';
$config['db_password'] = 'xxxxxxxxx';
$config['db_name'] = 'xxxxxxxxx';
$config['db_prefix'] = 'cms_';
$config['timezone'] = 'Europe/London';
$config['cgblog_adminsection'] = 'content';
ini_set("memory_limit", "256M");
?>

I've tried lots of things and was hoping I had missed a setting or could add some code to make it use the correct path.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1079
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBlog Browse Category path problem

Post by DIGI3 »

I can think of a few hacks or workarounds, but I think it must be something related to your configuration as I can't make it happen. I don't think it's necessarily a bug in the module.

The fact your install is in a subfolder might have something to do with it, but as you're not using pretty urls I'm not sure. What gets output when you add {root_url} to a page?

Also, just to make sure it's not some weird thing your browser or server config is doing, add a <pre>{$rec.url}</pre> to the foreach loop in the browsecat template to confirm what it's actually generating.
Not getting the answer you need? CMSMS support options
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12678
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: CGBlog Browse Category path problem

Post by Dr.CSS »

If it is in a subfolder are you using this..?

#Sub-dir e.g: /cmsms
RewriteBase /
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image
johnflan
Forum Members
Forum Members
Posts: 28
Joined: Thu Aug 23, 2007 5:20 pm

Re: CGBlog Browse Category path problem

Post by johnflan »

Dr CSS - Thank you - I'll look into the RewriteBase / surely it's got to be something like that. But, DIG13 - I think I'm closing in on something. Tried <pre>{$rec.url}</pre> and that was fine. Tried a lot of things in that direction, paths, server problems, setup and thought about re-installing.

Was getting desperate as it didn't make sense as the urls everywhere else were working, so just tried silly things and decided to change the CGBlog > Options tab > scrolling down to Summary View Options: and changed the Default Detail page from "None" to my page "Projects" and, it got rid of the admin/ in the path! It still linked to the "Home" page but at least it was linking to something in the website that I could work with.

Ok but here's the puzzling bit. To test it, I went back and changed the things I did {CGBlog action="browsecat" browsecattemplate="browsecat" detailpage:”projects”} and returned the CGBlog Options setting to None, None and the path is still good (without the admin/)! Weird.

And I'm using different browsers on different devices to check it.

Hmmm... what do you think was going on - could it be a server problem?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1079
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: CGBlog Browse Category path problem

Post by DIGI3 »

More likely it just had a bad value stored for a default page so the module messed up when trying to calculate it. Setting it to something, then back to none, may have solved that. Or it's possible you typod on detailpage='xyz' (like you did in your post) or something similar.
Not getting the answer you need? CMSMS support options
Locked

Return to “Modules/Add-Ons”