RSFORM issue with cookies

dpodesta
78 Posts
dpodesta posted this 20 April 2017

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('/&lt;!--TEMPLATE ([\s\S]*?) \/--&gt;/', $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.
2 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 24 April 2017

Hello David,
I'm sorry for delay in response.
Themler themes are using the variable names componentType and componentStyle. We cannot do anything about it.
You may consider editing the exported themes to change the variable names.

Regards,
Aileen

Hello David, I'm sorry for delay in response. Themler themes are using the variable names componentType and componentStyle. We cannot do anything about it. You may consider editing the exported themes to change the variable names. Regards, Aileen
Abbas Khan
157 Posts
Abbas Khan posted this 23 November 2025

Whether it’s a fitness challenge, a summer event, a chaotic group chat, or a funny online post, and this flexibility makes sweaty names a long-lasting humor trend rather than a short-term devon achane, and as language keeps evolving, sweaty names will continue inspiring new creative variations, proving that humor doesn’t have to be complicated to be effective.

Whether it’s a fitness challenge, a summer event, a chaotic group chat, or a funny online post, and this flexibility makes sweaty names a long-lasting humor trend rather than a short-term **[devon achane][1]**, and as language keeps evolving, sweaty names will continue inspiring new creative variations, proving that humor doesn’t have to be complicated to be effective. [1]: https://sweatynames.com/devon-achane-fantasy-football-team-names/
You must log in or register to leave comments