by
scratz » Tue Feb 03, 2015 9:51 pm
I've tried most everything I can think of to fix the "
cookies must be enabled to use this
cms" error I get. Here's what I've noticed.
I get the error when I copy/paste the users/login.php code into my own login form on my index.php page
when I navigate to the native form at users/login.php I can log in with no issue.
once I login, I can login from my index.php page as normal.
I've tried the different solutions that have been mentioned in previous posts.
setting the URL in kfunctions did not change
my charset is UTF-8
my lang is EN
I've looked at many files looking for extra spaces for the 'headers' error, but I have no extra spaces before the config files.
I've enclosed my entire html page with the if tags. I've even embedded the entire users/login.php code into the very top of index.html, just after the <?php couch ?> tags, making sure there were no spaces, and I still get the
cookies error.
Am trying to dig deeper to figure it out... here is my index.php code:
- Code: Select all
<?php require_once("couch/cms.php");?>
<cms:template title="Public Main Page" >
<cms:editable name='testimonials' label='Testimonials' type='richtext' />
<cms:editable name='norm_bio' label='Norm Bio' type='richtext'/>
<cms:editable name='dave_bio' label='Dave Bio' type='richtext'/>
</cms:template>
<cms:if k_logged_in >
<!-- this 'login' template also handles 'logout' requests. Check if this is so -->
<cms:set action="<cms:gpc 'act' method='get'/>" />
<cms:if action='logout' >
<cms:process_logout />
<cms:else />
<!--<p><cms:editable name='login_text' type='text' ></cms:editable></p>-->
</cms:if>
<cms:else />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title></title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/five.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,600,600italic' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body id="page-top" class="index">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
</div>
<span class="navbar-header page-scroll"><a class="navbar-brand page-scroll" href="#page-top">Hardcore Hardball</a></span>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="hidden"> <a href="#page-top"></a> </li>
<li> <a class="page-scroll" href="#login">Login / Register</a> </li>
<li> <a class="page-scroll" href="#normdave">About The Authors</a> </li>
<li> <a class="page-scroll" href="#why">Why</a> </li>
<li> <a class="page-scroll" href="#portfolio">Screenshots</a> </li>
<li> <a class="page-scroll" href="#testimonials">We Nailed 'Em</a> </li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<!-- Header -->
<header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">the absolute critical must-Have site for </div>
<div class="intro-heading">points-based daily league fantasy baseball</div>
<div class="intro-lead-in">If You're Playing Fantasy Baseball</div>
<div class="intro-heading">play to win</div>
<p>See More</p>
<a href="#why" class="page-scroll btn btn-xl"><i class="fa fa-angle-double-down fa-4x"></i></a>
</div>
</div>
</header>
<!-- Login Section -->
<section id="login">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="section-heading">Login / Register</h2>
<div class="line"></div>
</div>
</div>
<div class="row">
<div class="col-lg-8 col-lg-offset-2 text-center">
<p class="contact text-muted">
</div>
</div>
<div class="row">
<div class="col-lg-12">
<!-- now the real work -->
<!-- show the login form -->
<h1>Login</h1>
<cms:form method='post' name='login' anchor='1'>
<cms:if k_success >
<!--
The 'process_login' tag below expects fields named
'k_user_name', 'k_user_pwd' and (optionally) 'k_user_remember', 'k_cookie_test'
in the form
-->
<cms:process_login redirect='daily.php' />
</cms:if>
<cms:if k_error >
<h3><font color='red'><cms:show k_error /></font></h3>
</cms:if>
Email: <br/>
<cms:input type='text' name='k_user_name' /> <br/>
Password: <br />
<cms:input type='password' name='k_user_pwd' /> <br/>
<!-- if 'remember me' function is not required, the following checkbox can be omitted -->
<cms:input type='checkbox' name='k_user_remember' opt_values='Remember me=1' /> <br/>
<input type="hidden" name="k_cookie_test" value="1" />
<input type="submit" value="Login" name="submit"/>
</cms:form>
<!-- optionally display links for 'Create account' and 'Lost password' -->
<br />
<cms:if k_user_registration_template >
Not signed up yet? <a href="<cms:link k_user_registration_template />" />Create an account here.</a> <br>
</cms:if>
<cms:if k_user_lost_password_template >
Forgot your password? <a href="<cms:link k_user_lost_password_template />" />Click here.</a> <br>
</cms:if>
</div>
</div>
</div>
</section>
<!-- Login Section -->
<footer>
<?php include ("_includes/footer.php");?>
</footer>
</cms:if>
<?php COUCH::invoke(); ?>