close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Data assist, CSS formbuilder 2 html editor Bug or problem with validations

Thread began 11/26/2010 8:19 pm by Miguel | Last modified 2/08/2011 11:02 am by Jason Byrnes | 5371 views | 10 replies |

Miguel

Data assist, CSS formbuilder 2 html editor Bug or problem with validations

Hello webassist comunity need some help here almost lost my last few hairs, the new css formbuilder seems to nice but so buggy, i have a new issue or bug to report that i need to know a way around it.

Ill start explaining with the steps i did:


  1. I used the data assist wizard to create my pages for the admin panel.
  2. to the insert and edit pages i added css form builder to those made with data assist.
  3. with the form builder i added fields with html editor directly in the form builder.
  4. Selected the html editor pressed edit and selected the initial value laso placed xhtml 1.0 transitional to the settings, no encode types and also tried with encoded both also selecting and deselecting Encode html entries and also selecting and des-selecting acsii.
  5. Saved tested the validations made by the cssform builder
  6. left empty some required fields but added some text on the editor and when it does server validation to a field, i get the edsitor text wraped with html code.
  7. Selected html code button on the editor and it has a bunch of strange simbols.



Tested and retested changed all posible settings i dunno what else to do to avoid this, im sorry to say this but webassist still needs to improve to fix these bugs, i was suppose to have this site ready today and i can not give this with this bug.

Sign in to reply to this post

Jason ByrnesWebAssist

Please send a copy of the page so i can examine the code.

Sign in to reply to this post

Miguel

after rechecking and comparing with older sites i found out what the problem is and its with the new css form builder 2 on the file that it generates called wavt_validatedform_php.php

it comes with

php:
<?php
if (!session_id())  {
  
session_start();
}
function 
ValidatedField($page,$field)  {
  
$theFields"";
  
$retVal "";
  if (isset(
$_SESSION["WAVT_".$page."_Errors"]))  {
    
$theFields "&".$_SESSION["WAVT_".$page."_Errors"];
  }
  if (
strpos($theFields,"&WAVT_".$field."=") !== false)  {
    
$retVal substr($theFields,strpos($theFields,"&WAVT_".$field."=")+strlen("&WAVT_".$field."="));
  }
  if (
strpos($retVal,"&WAVT_") !== false)  {
    
$retVal substr($retVal,0,strpos($retVal,"&WAVT_"));
  }
  if (
$retVal == "" && $page == $field) {
    
$retVal ValidatedField($page,$field."_Errors");
  }
   return 
str_replace("<","&lt;",str_replace(">","&gt;",str_replace('"',"&quot;",$retVal)));
}

?>



On my other sites where this problem doesnt come in the same file that was created by css form builder 1 was

php:
<?php
if (!session_id())  {
  
session_start();
}
function 
ValidatedField($page,$field)  {
  
$theFields"";
  
$retVal "";
  if (isset(
$_SESSION["WAVT_".$page."_Errors"]))  {
    
$theFields "&".$_SESSION["WAVT_".$page."_Errors"];
  }
  if (
strpos($theFields,"&WAVT_".$field."=") !== false)  {
    
$retVal substr($theFields,strpos($theFields,"&WAVT_".$field."=")+strlen("&WAVT_".$field."="));
  }
  if (
strpos($retVal,"&WAVT_") !== false)  {
    
$retVal substr($retVal,0,strpos($retVal,"&WAVT_"));
  }
  if (
$retVal == "" && $page == $field) {
    
$retVal ValidatedField($page,$field."_Errors");
  }
  return 
$retVal;
}

?>




Comparing both files i notice this line wich is the one that afects the html editor with css form builder or the new validation toolkit it comes with

php:
return str_replace("<","&lt;",str_replace(">","&gt;",str_replace('"',"&quot;",$retVal)));



So i replaced the new file generated by css form builder 2 with the one generated with css form builder 1 and works, my suggestion is that i know it is to avoid exploits or code injections but im working internally with the manager of the site im building, when i use the old file every thing is marked on the server behavoir as invalid and cant do any change cause it will overwrite the file again, css form builder should come with a file asking wich type of validation file should it use or something to avoid this, it works ok when its for page update but not when its for page insert taking the initial value from the validation form fields, when this happens the html editor shows those tags or quot wich is a pain in the a....

Sign in to reply to this post

Jason ByrnesWebAssist

ok, thanks for the input, I will log this as a bug so the engineers can look into the problem.

Sign in to reply to this post

Andrew Read

Originally Said By: Jason Byrnes
  ok, thanks for the input, I will log this as a bug so the engineers can look into the problem.  



Just ran smack dab into this same issue with Form Toolkit and HTML Editor - is there a fix yet?

Sign in to reply to this post

Jason ByrnesWebAssist

No, there is not a fix for this issue at this time.

it has been logged to be investigated by the engineering team.

Sign in to reply to this post

Andrew Read

FYI - changing the same line of code also fixed the issue for me, not sure what else it has caused but it has fixed this issue. ;o)

Sign in to reply to this post

Andrew Read

I just spent another 20 minutes looking for the solution to this issue - can this PLEASE make it into a Known Issues chunk on the downloads page and be posted as a stickey until the Known Issue is fixed???

:)

Sign in to reply to this post

Jason ByrnesWebAssist

i have added a sticky thread:
showthread.php?p=89936#post89936

Sign in to reply to this post

Andrew Read

Thanks Jason,

Is there any way that a policy can be set that these stickies get created anytime a Known Issue is found - at least until they are officially fixed?

Thanks.

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...