Problems, need help? Have a tip or advice? Post it here.
8 posts Page 1 of 1
This is an Extraordinary and Weird thing which has been happening ever since my website has gone Live.

I have got a Menu bar which i have listed properly using:
<cms:folder name="xxxx" title="xxx" />
in my clonable template(before starting the HTML portion, on the top of the page).

Then i've accessed it in the portion I want to Display the Menu, in the following way:

<cms:folders masterpage='xxxx.php' >
<li class=""><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></li>
</cms:folders>

PS: xxxx stands for the name of my cloned masterpage, or the cloned Template.

Everything is working fine. BUT, whenever i click on any Menu item from any of the open pages or the Home Page, i get a 'Page Not Found' error!!

Just after that if on another Tab(I'm using Chrome), I open http://www.example.com/couch and log in to my Couch panel, and then go back to my Website(on the previous Tab) and click any Menu item, it opens Correctly!!

How can this happen!!

I've tried doing this from my Mobile also and the same thing happens!
I have to Log in to my Couch panel, be it in my mobile or PC, and then the Menu items will open(when clicked) properly!

After I've logged in to my Couch Panel once, then Every Menu Item Clicks are working charmingly and that means I don't have any problem in my Code, I Guess.
But Whenever I do not Log In to my couch and try to access those Items by Clicking, they land me a 'Page Not Found' Error.

Please Someone Help me out on this terrible Problem.

Thank You in Advance.
Here is one thing it might be. In the back end, under the Advanced Settings tab, check to be sure the page is published. If a page is unpublished, it will be visible only to an admin. Anyone else will get a 404 error.
@tim, I think the page-view is fine. It is only the folder-view that is problematic so the reason must lie somewhere else.

@SamarpanBiswas, since the folder-views work when you are logged-in as admin, please try reviewing your code to see if you have not placed a check somewhere (maybe in a snippet) that allows access to only admin to this view?

This sometimes inadvertently happens when one mistakenly places some code within <cms:template> block (as this block executes for only admins).

Let us know how it goes.
KK wrote: @tim, I think the page-view is fine. It is only the folder-view that is problematic so the reason must lie somewhere else.

@SamarpanBiswas, since the folder-views work when you are logged-in as admin, please try reviewing your code to see if you have not placed a check somewhere (maybe in a snippet) that allows access to only admin to this view?

This sometimes inadvertently happens when one mistakenly places some code within <cms:template> block (as this block executes for only admins).

Let us know how it goes.



I've scrolled through the code and I couldn't come across any anomalies or may be I can't locate them. That is why I'm putting up the <cms:template> part of the code hoping it will help you to debug.


<?php require_once( 'couch/cms.php' ); ?>


<cms:template title='Blog' clonable='1' commentable='1'>

<cms:editable name='blog_content1' type='richtext' />

<cms:editable name='blog_content2' type='richtext' />
<cms:editable name='blog_content3' type='richtext' />

<cms:editable name='author_bio' type='richtext' />

<cms:editable name='blog_image'
crop='1'
width='550'
height='330'
type='image'
/>

<cms:editable name='blog_image1'
crop='1'
width='520'
height='300'
type='image'
/>

<cms:editable name='blog_image2'
crop='1'
width='520'
height='300'
type='image'
/>
<cms:folder name="sports" title="Sports" />
<cms:folder name="abroadindians" title="Abroad Indians" />
<cms:folder name="technology" title="Technology" />
<cms:folder name="reads" title="Reads" />
<cms:folder name="fashion" title="Fashion" />
<cms:folder name="humour" title="Humour" />
<cms:folder name="travel" title="Travel" />
<cms:folder name="interesting" title="Interesting" />
</cms:template>

After this, my <cms:if k_is_page > starts.





Now I'm putting up the code of the navbar.html snippet, I mean the code of the page which actually has the Menu. I Have used <cms:embed 'navbar.html' /> in my clonable template, 'Blog', whose code i pasted above.




<div id="navarea">
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid" align="center">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>

<div id="navbar" class="navbar-collapse collapse">

<ul class="nav navbar-nav custom_nav">
<li class=""><a href="<cms:link 'index.php' />">Home</a></li>

<cms:folders masterpage='single_blog.php' >
<li class=""><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></li>
</cms:folders>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
</div>



Please help me out.
Thank you in Advance.
Can you PM me the FTP+Couch creds to your site please?
KK wrote: Can you PM me the FTP+Couch creds to your site please?


Okay PM-ing you.
Thanks.

Though I have not been granted access to the site, I think I can see the problem.

Please try the following -
login as super-admin and access the 'folder-view' or 'home-view'.
Unlike a normal user who gets a '404 page not found' at this point, you should be able to access the view just fine.

Come back to the admin-panel and you'll notice that Couch would have created a 'default page - please rename this..' kind of page for you.

If I'm correct, you must be deleting this page. Don't delete it.
Simply unpublish it (from advanced settings). You may also rename it to something like 'DO NOT DELETE" so that you don't happen to delete it inadvertently in the future.

Logoff and try accessing the problem views a normal user and you should be able to see those displayed.

Does it help? Please let us know.

Thanks.
KK wrote: Thanks.

Though I have not been granted access to the site, I think I can see the problem.

Please try the following -
login as super-admin and access the 'folder-view' or 'home-view'.
Unlike a normal user who gets a '404 page not found' at this point, you should be able to access the view just fine.

Come back to the admin-panel and you'll notice that Couch would have created a 'default page - please rename this..' kind of page for you.

If I'm correct, you must be deleting this page. Don't delete it.
Simply unpublish it (from advanced settings). You may also rename it to something like 'DO NOT DELETE" so that you don't happen to delete it inadvertently in the future.

Logoff and try accessing the problem views a normal user and you should be able to see those displayed.

Does it help? Please let us know.

Thanks.



Thank you tonnes. I was expecting your PM, so i didn't check here. :)

That trick you mentioned, worked perfectly.

Thank you again.
:D
8 posts Page 1 of 1