Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Locked Regions & Server Behaviors

Guest
Dec 17, 2007 Dec 17, 2007
Hi:

Any help to resolve this problem

making this change would require changing code that is locked by a template or a translator

I use templates in all of my projects along with server behaviors, and i frequently get this error.

I have worked around this by adding necessary recordset behaviors before applying template but sometimes you don't know always what you would be requiring at the end and even if i do know the Recordset pagination invokes this error which I actually use after applying template to my page.

Sometimes i would apply a recordset in a temporary file and will copy the pertinent code from there to the page i am working on.

I want an efficient approach to use server behaviors without any conflict with templates. I usually have simple templates with a single editable field for recordset display.

Is it something wrong with the way I am creating template or what should be the approach to avoid this error. Further sometimes I do have server behaviors inside templates (not always).

P.S. Post earlier to General Category but I believe this is the right one.
TOPICS
Server side applications
553
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 17, 2007 Dec 17, 2007
> Is it something wrong with the way I am creating template or what should
> be
> the approach to avoid this error. Further sometimes I do have server
> behaviors
> inside templates (not always).

This error is often unrelated to template editable regions, or to edits you
have hust made, and is thrown whenever DW encounters an error on the page
(or even in the CSS). When I get it (and I work with Templates and SBs
quite a lot) the first thing I do is to stop and validate the page. That's
usually enough to find (and fix) the error.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Saad Shams" <webforumsuser@macromedia.com> wrote in message
news:fk70rf$4sq$1@forums.macromedia.com...
> Hi:
>
> Any help to resolve this problem
>
> making this change would require changing code that is locked by a
> template or
> a translator
>
> I use templates in all of my projects along with server behaviors, and i
> frequently get this error.
>
> I have worked around this by adding necessary recordset behaviors before
> applying template but sometimes you don't know always what you would be
> requiring at the end and even if i do know the Recordset pagination
> invokes
> this error which I actually use after applying template to my page.
>
> Sometimes i would apply a recordset in a temporary file and will copy the
> pertinent code from there to the page i am working on.
>
> I want an efficient approach to use server behaviors without any conflict
> with
> templates. I usually have simple templates with a single editable field
> for
> recordset display.
>
> Is it something wrong with the way I am creating template or what should
> be
> the approach to avoid this error. Further sometimes I do have server
> behaviors
> inside templates (not always).
>
> P.S. Post earlier to General Category but I believe this is the right one.
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 17, 2007 Dec 17, 2007
okay and do you use recordsets within templates too? how do you implement that, normally I would copy paste the code between <head></head tags for it to be available throughout the website.

May above also be the cause of this error. what do you say?

And you know what I validated my document and it only complains about a missing alt attribute, usually i don't code html myself, its auto generated.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 18, 2007 Dec 18, 2007
> okay and do you use recordsets within templates too?

Sure.

> for it to be
> available throughout the website.

So you want a recordset added in the template to be available to all pages
in the site? There are two ways you could do this -

1. The way you are doing it (adding it to a non-editable region between
<head> and </head>, or
2. If you don't want to have any unique server-scripted content on any of
the child pages, you could just make the region outside <html> tags
non-editable by including this line in the template page -

<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->

All child pages made from this template will treat the region above <html>,
or below </html> as a locked region.

I don't normally work with recordsets this way, though.

> May above also be the cause of this error. what do you say?

Definitely not.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Saad Shams" <webforumsuser@macromedia.com> wrote in message
news:fk7qva$1ch$1@forums.macromedia.com...
> okay and do you use recordsets within templates too? how do you implement
> that,
> normally I would copy paste the code between <head></head tags for it to
> be
> available throughout the website.
>
> May above also be the cause of this error. what do you say?
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 18, 2007 Dec 18, 2007
Still I am unable to track the problem. To avoid future problems, where exactly do you suggest me to place code within head section. I doubt that it may happened due to code in head section at arbitrary places.

I have checked with creating a simple template with few tables in it, adding server behaviors works fine, as a result of increase in design/code may be due to addition of code in head section, i believe it happens due to that.

Here is a pattern of dreamweaver head section of a template, suggest me a safest place within this region.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>

Well at this point, i added some SB and the error appears again on further SBs, check it yourself.

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<?php mysql_select_db($database_connBalanaa, $connBalanaa);
$query_Recordset1 = "SELECT * FROM advertise";
$Recordset1 = mysql_query($query_Recordset1, $connBalanaa) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);?>
</head>

Can't add any further Recordset after that on CHILD Pages.

Looking forward to your kind suggestions.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 19, 2007 Dec 19, 2007
The page validates without adding the SB?

I can see nothing wrong with your markup as posted.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Saad Shams" <webforumsuser@macromedia.com> wrote in message
news:fk9bvc$poc$1@forums.macromedia.com...
> Still I am unable to track the problem. To avoid future problems, where
> exactly
> do you suggest me to place code within head section. I doubt that it may
> happened due to code in head section at arbitrary places.
>
> I have checked with creating a simple template with few tables in it,
> adding
> server behaviors works fine, as a result of increase in design/code may be
> due
> to addition of code in head section, i believe it happens due to that.
>
> Here is a pattern of dreamweaver head section of a template, suggest me a
> safest place within this region.
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <!-- TemplateBeginEditable name="doctitle" -->
> <title>Untitled Document</title>
> <!-- TemplateEndEditable -->
> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
> </head>
>
> Well at this point, i added some SB and the error appears again on further
> SBs, check it yourself.
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <!-- TemplateBeginEditable name="doctitle" -->
> <title>Untitled Document</title>
> <!-- TemplateEndEditable -->
> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
> <?php mysql_select_db($database_connBalanaa, $connBalanaa);
> $query_Recordset1 = "SELECT * FROM advertise";
> $Recordset1 = mysql_query($query_Recordset1, $connBalanaa) or
> die(mysql_error());
> $row_Recordset1 = mysql_fetch_assoc($Recordset1);
> $totalRows_Recordset1 = mysql_num_rows($Recordset1);?>
> </head>
>
> Can't add any further Recordset after that on CHILD Pages.
>
> Looking forward to your kind suggestions.
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 19, 2007 Dec 19, 2007
That's true, the code is valid but once you
1) include a recordset inside head section of template (same way as I did),
2) Create a child page of the template
3) then add another RECORDSET through SB dialog on this child page.

On OK you would receive the error message. Want to have your feedback on this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 26, 2007 Dec 26, 2007
LATEST
Just did a research on the internet and found suggestions for using Server Side includes instead of using recordset within templates.

Any comments?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines