close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Server Behavior Doesn't Show Up....

Thread began 6/04/2011 2:47 pm by Jim E D | Last modified 3/12/2012 7:13 am by Jason Byrnes | 2736 views | 11 replies |

Jim E D

Server Behavior Doesn't Show Up....

When I open the attached file the Multiple Records insert section on lines 72-106 no longer show up in the Server Behaviors panel.

It worked for two days and now does not update the ID field in the second file. Anyone deal with anything like this?

Attached Files
mkr_InsertMulRec.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the server is not showing because of the line you commented.

because you changed the code for the server behavior, it is no longer recognized as the code footprint for the multiple record insert behavior.
change line 60:

php:
//JED Removed per session start error on .com site     if (!session_id()) session_start();



back to the original:

php:
if (!session_id()) session_start();



the true cause of the error that you received that prompted you to comment that code is the comment at lines 1- 4:

<!--Originally mkr_Insert with Blank2Col template
added hidden update UserID and Dates from Cate3
added CSS formatting for categories
Prior step to MRT Server Behavior-->




this is going to cause the headers already sent error to occur due to html output to the page before the session_start() or headers() function.

Sign in to reply to this post

Jim E D

Thanks...

Sorry for the inexperience on this one....

Sign in to reply to this post

Jason ByrnesWebAssist

No worries.

Sign in to reply to this post

Nico

Same error

I am getting the same error. DW CS5.5 cant recognize the Server Behavior and I am getting a "Headers already sent" error.

Thank you.

Attached Files
headersAlreadySent.zip
Sign in to reply to this post

Jason ByrnesWebAssist

all of the code in your page has become double spaced.

this is causing thr translator to not recognize the server behavior, an also causing the headers already sent error due to spaces between the php tags.


see this post for details on the headers already sent error:
showthread.php?t=19285

Sign in to reply to this post

Nico

OK

It worked.
I did delete the gaps between the ?><?php tags but didn't try to delete the gaps inside the php code before contacting you.
Removing all the gaps made the code work.

Thank you very much.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Nico

cant find what is wrong

Can you please help me find out why dreamweaver not recognising the Update Server Behavior in this file? Been trying for hours to fix the problem but can' t find what is wrong.
Could it possibly be that this page was created with Dataassit 2.0.9?
Now using Dataassist 2.1.0 on Dreamweaver CS5.5 (windows 7)

Thank you in advance

Attached Files
news_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

the update code needs a couple of line breaks to break it up into the expected sections:

php:
<?php 

// WA Application Builder Update
if (isset($_POST["Update_x"])) // Trigger
{
$WA_connection $analogiaCon;
$WA_table "news";
$WA_redirectURL "news_Detail.php?newsid=".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"")  ."";
if (
function_exists("rel2abs")) $WA_redirectURL $WA_redirectURL?rel2abs($WA_redirectURL,dirname(__FILE__)):"";
$WA_keepQueryString false;
$WA_indexField "newsid";
$WA_fieldNamesStr "newstitle|newstitleuk|newsdescription|newsdescriptionuk|newsthumb|newsactive";
$WA_fieldValuesStr "".((isset($_POST["newstitle"]))?$_POST["newstitle"]:"")  ."" "|" "".((isset($_POST["newstitleuk"]))?$_POST["newstitleuk"]:"")  ."" "|" "".((isset($_POST["newsdescription"]))?$_POST["newsdescription"]:"")  ."" "|" "".((isset($_POST["newsdescriptionuk"]))?$_POST["newsdescriptionuk"]:"")  ."" "|" "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"]  ."" "|" "".((isset($_POST["newsactive"]))?$_POST["newsactive"]:"")  ."";
$WA_columnTypesStr "',none,''|',none,''|',none,''|',none,''|',none,''|none,none,NULL";
$WA_comparisonStr "=|=|=|=|=|=";
$WA_fieldNames explode("|"$WA_fieldNamesStr);
$WA_fieldValues explode("|"$WA_fieldValuesStr);
$WA_columns explode("|"$WA_columnTypesStr);

$WA_where_fieldValuesStr "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"")  ."";
$WA_where_columnTypesStr "none,none,NULL";
$WA_where_comparisonStr "=";
$WA_where_fieldNames explode("|"$WA_indexField);
$WA_where_fieldValues explode("|"$WA_where_fieldValuesStr);
$WA_where_columns explode("|"$WA_where_columnTypesStr);
$WA_where_comparisons explode("|"$WA_where_comparisonStr);

$WA_connectionDB $database_analogiaCon;
mysql_select_db($WA_connectionDB$WA_connection);
if (!
session_id()) session_start();
$updateParamsObj WA_AB_generateInsertParams($WA_fieldNames$WA_columns$WA_fieldValues, -1);
$WhereObj WA_AB_generateWhereClause($WA_where_fieldNames$WA_where_columns$WA_where_fieldValues,  $WA_where_comparisons );
$WA_Sql "UPDATE `" $WA_table "` SET " $updateParamsObj->WA_setValues " WHERE " $WhereObj->sqlWhereClause "";
$MM_editCmd mysql_query($WA_Sql$WA_connection) or die(mysql_error());
if (
$WA_redirectURL != "")  {
if (
$WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL'?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL);
}
}
?>
Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...