• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 1:10 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 23, 2007 5:20 pm
Posts: 26
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/backup/rvjazzandblues_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".

\$1:
{* 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}


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 2:24 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 987
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 3:02 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 23, 2007 5:20 pm
Posts: 26
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.

\$1:
<?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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 3:34 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 987
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 10:20 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12675
Location: Arizona
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/
$1


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem
PostPosted: Thu Jul 30, 2020 11:38 pm 
Offline
Forum Members
Forum Members

Joined: Thu Aug 23, 2007 5:20 pm
Posts: 26
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: CGBlog Browse Category path problem  Topic is solved
PostPosted: Fri Jul 31, 2020 12:09 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 987
Location: Victoria, BC
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting