Advanced Conditional Region 2.0(free extension) Support Product Page

In progress

Using Advanced Condition Region 2.0 breaks DW Log in User behavior

Reported 05 Jul 2010 21:23:53
has this problem
05 Jul 2010 21:23:53 Ryan McFall posted:
I have the following simple PHP page (this is not my actual use case, but a simplified example to demonstrate a problem):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<?php if (1 == 1) { // Adv Conditional Region ?>
  <p>Log in </p>
  <?php } // 1 == 1 ?>
<form id="form1" name="form1" method="post" action="">
    <label for="username">Email Address</label>
    <input type="text" name="username" id="username" />
    <br />
    <br />
    <label for="password">Password</label>
    <input type="text" name="password" id="password" />

If I then try to add the "Log in User" server behavior to the page, I get the following error message:

QuoteWhile executing applyServerBehavior in Login User.htm, a JavaScript error occurred

Removing the conditional region from the page and then adding the "Log in User" behavior works correctly.

Order is important here. If I add the log in user behavior to the page first, and then add the advanced conditional, things work fine (but double-clicking on the log in user behavior in the server behaviors panel and then attempting to save changes then results in an error). Interestingly, the name of the page with the error changes from "Login User.html" to "Login User2.html", although this could be a result of editing an existing behavior rather than inserting a new one.

Any ideas?


Replied 06 Jul 2010 10:42:03
06 Jul 2010 10:42:03 Miroslav Zografski replied:
Hello Ryan,

The code that is inserted from our extension is nothing but simple php code that you can try inserting manual and check it that is the problem.

That may depend on the variable you are entering in the adv. cond reg. so test that as well.

Replied 06 Jul 2010 14:55:25
06 Jul 2010 14:55:25 Ryan McFall replied:
Thanks for the reply. I have tried creating a page with a login form plus the following segments of PHP code, and then inserting the Log In User server behavior. The first 3 segments of PHP code work, while the last two do not

Working example 1:
<?php if (1 == 1) { ?>
<p>1 is 1</p>
  <?php } ?>

Working example 2
<?php if (isset($_SESSION['MM_Username'])) { ?>
  <p>User name is set</p>
<?php } ?>

Working example 3
<?php if (1==1) { // my comment ?>
  <p>User name is set</p>
<?php } // my comment ?>

Non-working example 1
<?php if (isset($_SESSION['MM_Username'])) { // Adv Conditional Region ?>
  <p>User name is set</p>
<?php } // isset($_SESSION['MM_Username']) ?>

Non-working example 2
<?php if (1==1) { // Adv Conditional Region ?>
  <p>User name is set</p>
<?php } // 1==1 ?>

Note that both a simple and somewhat complex expression in the if statement work correctly, as long as the string Adv Conditional Region does not appear in the comment after the conditional.

If I launch the extension manager and disable the Advanced Conditional Region extension, insert the code in non-working example 1, and then add the Log In User behavior, it works. Closing DW, re-enabling the extension, and trying it again leads to failure.

So based on this evidence, it seems to me that there must be some interaction with the Adv Conditional behavior that is causing problems.

Any other ideas? Thanks for your help!

Replied 07 Jul 2010 11:28:32
07 Jul 2010 11:28:32 Miroslav Zografski replied:
Hello Ryan,

Thanks for those details. We will test on our side for interactions "under the hood" that could cause this behavior.

Replied 07 Jul 2010 21:49:15
07 Jul 2010 21:49:15 Ryan McFall replied:
QuoteHello Ryan,

Thanks for those details. We will test on our side for interactions "under the hood" that could cause this behavior.


I never mentioned this in my previous posts, so it's probably important to know that I'm running Dreamweaver CS 4 (version 10.0 build 4117). I'm running Windows 7 on the machine I'm doing the development on.

Today I tried a fresh install of Dreamweaver on a virtual machine (XP Pro), and had only the Advanced Conditional extension installed. The problem still exists, so it seems that it should be fairly easy to replicate.

Note also that it's not just the Log In User behavior that has problems - I've had problems with just about every other server behavior when the page I'm trying to insert them into uses the Advanced Conditional extension.
Replied 28 Jul 2010 17:50:29
28 Jul 2010 17:50:29 Ryan McFall replied:
Any updates on this?

Reply to this topic