Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9121647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:54:36+00:00 2026-06-17T05:54:36+00:00

Welcome. I have a strange situation because my Yii framework itself generates links for

  • 0

Welcome.

I have a strange situation because my Yii framework itself generates links for logged off and put it in the body of view of each element (span, div, li and other)
By this problem, on every click in the body of the view I get logged off

To generate view i used $this->render();

In result DOM look like this:

<section class="top-line">
    <div class="right">
         <a href="/workflow/?r=user/logout"> </a>
    </div>
    <a href="/workflow/?r=user/logout"> </a>
</section>
<a href="/workflow/?r=user/logout">
  <div class="main-box">...</div>
</a>

<footer>
<a href="/workflow/?r=user/logout"> </a>
<div class="container">..</div>
</footer>

@DarkMukke Include layouts/main.php:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="language" content="en" />
    <link rel="shortcut icon" href="<?php echo Yii::app()->request->baseUrl; ?>/favicon.ico" type="image/x-icon" />
    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css" href="<?php echo baseUrl(); ?>/css/screen.css" media="screen, projection" />
    <link rel="stylesheet" type="text/css" href="<?php echo baseUrl(); ?>/css/print.css" media="print" />
    <!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php echo baseUrl(); ?>/css/ie.css" media="screen, projection" />
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="<?php echo baseUrl(); ?>/css/form.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo baseUrl(); ?>/css/blue/style.css" />

    <?php
    $cs = cs();
    $cssCoreUrl = $cs->getCoreScriptUrl();
    $cs->registerCssFile($cssCoreUrl . '/jui1.9.2/css/base/jquery-ui.css');
    $cs->registerCoreScript('jquery');
    $cs->registerCoreScript('jquery.ui');
    $cs->registerCoreScript('cookie');
    $cs->registerScriptFile('js/block.js');
    $cs->registerScriptFile('js/global.js');
    $cs->registerScriptFile('css/blue/style.js');
    ?>

    <title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>
<body>

    <header class="top">
        <div class="container">
            <div class="logo">
                <h1><a href="<?php echo Yii::app()->baseUrl; ?>" ><?php echo CHtml::encode(Yii::app()->name); ?></a></h1>
            </div>
            <nav>
                <?php $this->widget('Menu'); ?>
            </nav>
        </div>
    </header>

    <section class="top-line">
        <div class="container">
            <?php if (isset($this->breadcrumbs)): ?>
                <div class="left">
                    <?php
                    $this->widget('zii.widgets.CBreadcrumbs', array(
                        'links' => $this->breadcrumbs,
                    ));
                    ?>
                </div>
            <?php endif ?>
            <?php if (Yii::app()->user->isGuest == false): ?>
                <div class="right">
                    <a href="<?php echo url('/user/logout'); ?>"><?php echo t('Logout') . ' (' . Yii::app()->user->name . ')'; ?>
                </div>
            <?php endif; ?>
        </div>
    </section>

    <div class="main-box">
         <div class="container clear">
                <div class="clear cenetr">
                    <?php
                    foreach (Yii::app()->user->getFlashes() as $key => $message) {
                        echo '<div class="flash-' . $key . '">' . $message . " <span class=\"close-flush-btn\"></span></div>\n";
                    }
                    ?>
                </div>
        </div>
        <div class="wrapper">
            <?php echo $content; ?>
        </div>
    </div>
    <footer>
        <div class="container">
            <div class="wrapper">
                <div class="fleft"><?php echo Yii::app()->params['copyrightInfo']; ?></div>
                <div class="fright"><?php echo Yii::powered(); ?></div>
            </div>
        </div>
    </footer>
</body>

Has anyone had this problem? Which may result from such conduct.

[Solved] My stupid mistake. Do not shut a tag in logout link and body react on every click. What a shame .. Thanks for your interest.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:54:37+00:00Added an answer on June 17, 2026 at 5:54 am

    you have you main-box inside your tag

    use this as last 3 lines there, otherwise every click on main-box willt rigger the element

    <a href="/workflow/?r=user/logout"> </a>
    <div class="main-box">
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to have links on the welcome page which point to defined
I have a strange situation using SetWindowsHookEx I have a bcb 2009 project with
Sorry about the extremely vague question title (any suggestions for improvements welcome) I have
I have this welcome.php which the administrator is redirected when he is authenticated, i
I have an Activity which shows a welcome message if started for the first
Welcome! I have a recursive public static method named less that takes a tree
I have the string 1. Welcome . I'd like to split the string into
I have a following items displayed on an asp.net page (C#). 1 Welcome 2
Suppose we have a menu which presents the user with some options: Welcome: 1)
Welcome, I notice that Youtube make some changes into their website code. Anyone have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.