HI
I have an issuewith RSFORM using the template recently. The admin section to create the forms, when i try to edit a form field the edit area is blank. I contacted RSJOOMLA and they told me the reason below.
What are your thoughts on this? It causes me to have to continually clear my cache when creating a form, basicaly every time I check the form in the front end I need to clear the cache. I can probably live with it if it this is something the template needs for stability.
"The issue is caused by your template: it sets 2 cookies, named "componentType" and "componentStyle". Unfortunately "componentType" is a variable used by RSForm! Pro as well (and it identifies the type of field you're editing - so it knows what kind of properties to display). This variable gets sent on every "Edit" request on a field, but since it's already set in a cookie, the cookie overwrites the request. That's why when you check your website's frontend, the cookie "componentType" gets populated and RSForm! Pro can no longer identify it properly. The code that does this is located here:
templates/jwbayswaterbd/editor/functions.php
// save cookie for rendering one component
setcookie('componentType', $templateType, 0, '/');
templates/jwbayswaterbd/functions.php
// save cookie for rendering one component
setcookie('componentType', $templateType, 0, '/');
It's also used here:
/templates/jwbayswaterbd/component.php
/home/okxfagpa/public_html/templates/jwbayswaterbd/editor/component.php
$componentStyle = 'common';
if (preg_match('/<!--TEMPLATE ([\s\S]*?) /-->/', $content, $matches)) {
$content = str_replace('<!--TEMPLATE ' . $matches[1] . ' /-->', '', $content);
$parts = explode('_', $matches[1]);
if ($parts[0] == $_COOKIE['componentType'] && isset($_COOKIE['componentStyle']))
$componentStyle = $_COOKIE['componentStyle'];
}
$content = getCustomComponentContent($content, JRequest::getVar('componentStyle', $componentStyle));"
HI
I have an issuewith RSFORM using the template recently. The admin section to create the forms, when i try to edit a form field the edit area is blank. I contacted RSJOOMLA and they told me the reason below.
What are your thoughts on this? It causes me to have to continually clear my cache when creating a form, basicaly every time I check the form in the front end I need to clear the cache. I can probably live with it if it this is something the template needs for stability.
"The issue is caused by your template: it sets 2 cookies, named "componentType" and "componentStyle". Unfortunately "componentType" is a variable used by RSForm! Pro as well (and it identifies the type of field you're editing - so it knows what kind of properties to display). This variable gets sent on every "Edit" request on a field, but since it's already set in a cookie, the cookie overwrites the request. That's why when you check your website's frontend, the cookie "componentType" gets populated and RSForm! Pro can no longer identify it properly. The code that does this is located here:
templates/jwbayswaterbd/editor/functions.php
// save cookie for rendering one component
setcookie('componentType', $templateType, 0, '/');
templates/jwbayswaterbd/functions.php
// save cookie for rendering one component
setcookie('componentType', $templateType, 0, '/');
It's also used here:
/templates/jwbayswaterbd/component.php
/home/okxfagpa/public_html/templates/jwbayswaterbd/editor/component.php
$componentStyle = 'common';
if (preg_match('/<!--TEMPLATE ([\s\S]*?) \/-->/', $content, $matches)) {
$content = str_replace('<!--TEMPLATE ' . $matches[1] . ' /-->', '', $content);
$parts = explode('_', $matches[1]);
if ($parts[0] == $_COOKIE['componentType'] && isset($_COOKIE['componentStyle']))
$componentStyle = $_COOKIE['componentStyle'];
}
$content = getCustomComponentContent($content, JRequest::getVar('componentStyle', $componentStyle));"
Vote to pay developers attention to this features or issue.