Hi folks
I have just updated both Joomla and Chrono Connectivity (and chrono forms) to the latest version and it seem that the switch function which is looking for a not found event on a read data function no longer works
im using the function to display a no results message when the user uses filters to refine results and no results are returned
this method was working fine until i updated
debug shows data returned but yet the switch function returns "true" and shows the no results view
see attached image for switch function setup
any help or advise appreciated
I have just updated both Joomla and Chrono Connectivity (and chrono forms) to the latest version and it seem that the switch function which is looking for a not found event on a read data function no longer works
im using the function to display a no results message when the user uses filters to refine results and no results are returned
this method was working fine until i updated
debug shows data returned but yet the switch function returns "true" and shows the no results view
see attached image for switch function setup
any help or advise appreciated
note: image posted twice so removed this one
this is the setup
FYI: Changed the expected value from true/false to 1/0 and that fixed it.
NOTE FOR MAX
It appears that for some reason the Switch and Event Switcher actions work differently here. An event switcher with data source {data.empty:field} will switch on true/false, but a Switch will switch on 1 / 0. Attached form backup to demonstrate.[file=11657]Event_Switch_Testing_05_Mar_2019_03_09_24.cf6bak[/file]
It appears that for some reason the Switch and Event Switcher actions work differently here. An event switcher with data source {data.empty:field} will switch on true/false, but a Switch will switch on 1 / 0. Attached form backup to demonstrate.[file=11657]Event_Switch_Testing_05_Mar_2019_03_09_24.cf6bak[/file]
I have problem with the switch function too.
In a brand new joomla I installed CCv6 v. 6.0.10
I created a switch function to display a different icon in a table view based on a field value:
Data provider:
If I change false and true to 0 and 1 it doesn't work but it did in previous versions.
I create another switch:
Data provider:
I tried setting the switch to return the value as var or not to no avail.
That's a big problem, this is going to break a lot of code.
bye
maxx
In a brand new joomla I installed CCv6 v. 6.0.10
I created a switch function to display a different icon in a table view based on a field value:
Data provider:
{var/empty:mytable.row.myfield}Values setup:
false:<i class="sign in teal icon"></i>In a table view column I put {fn:myswitch} and it works as expected.
true:<i class="sign out brown icon"></i>
If I change false and true to 0 and 1 it doesn't work but it did in previous versions.
I create another switch:
Data provider:
{data:myformfield}Values setup:
1:fooI put {fn:my2ndswitch} in an event Content or in a Form Area Content but it doesn't work.
2:foofoo
I tried setting the switch to return the value as var or not to no avail.
That's a big problem, this is going to break a lot of code.
bye
maxx
Put a {debug:} in, make sure you're actually getting the data you think you are
Put a {debug:} in, make sure you're actually getting the data you think you are
I'm sure, the {debug:} is already there.
The switch has been updated since now you can use regular expressions and *:
Multi line list of possible value and returned result, values can be passed as regular expressions, * matches any value.
In the previous version that same note read as:
Multi line list of possible value and returned result.
So your switches are not working AT ALL? NOTHING is happening?
So your switches are not working AT ALL? NOTHING is happening?As I wrote, they're working when used inside a table view.
I tried to use them in an event and in a form area and nothing happens (nothing is displayed when the expected returned value is a string, no view is displayed if the expected matched value is set to display a view.)
In the debug output there's always:
[myswitch] => Array ( [finished] => 1 [var] => )
Oh okay if you use
Your other switch, with {data:myformfield} as the data source, is the myformfield data showing up in the {debug:}?
{var/empty:mytable.row.myfield}when you're not in the table view or in a row isn't going to work.
Your other switch, with {data:myformfield} as the data source, is the myformfield data showing up in the {debug:}?
I setup a form so you can check yourself:
https://secure.sthdev01.soteha.com/traffic/TA/index.php?option=com_chronoconnectivity6&cont=manager&conn=test-switch&event=index
In the index event the code is:
Submits to index
Data provider {data:}
Name checkboxes1
Options
Data provider {data:checkboxes1}
Return the result as var? is set
Values setup
https://secure.sthdev01.soteha.com/traffic/TA/index.php?option=com_chronoconnectivity6&cont=manager&conn=test-switch&event=index
In the index event the code is:
{view:form2}form2:
Here the switch return value: {fn:switch1}{var:switch1}
{debug:}
Submits to index
Data provider {data:}
Contentfield_checkboxes1:
{view:field_checkboxes1}
{view:field_button3}
Name checkboxes1
Options
1=Yesswitch1:
2=No
Data provider {data:checkboxes1}
Return the result as var? is set
Values setup
1:it's a YesI never read it's a Yes or it's a No after Here the switch return value:
2:it's a No
Can you PM me login details so I can take a look?
VERFIFIED: User didn't have CF installed and the switch function simply wasn't working. Installed CF and now it's working, but user should've have had to.
...but user should've have had to.
And developers or sellers should have had to write in big letters in the download page of CCv6 that all its features work only if CFv6 in installed too!
Hi,
The issue is that the switch function had a glitch which was fixed in the latest CF release but CC did not get the same fix yet, installing CF had updated the shared lib files and fixed the problem.
Best regards
The issue is that the switch function had a glitch which was fixed in the latest CF release but CC did not get the same fix yet, installing CF had updated the shared lib files and fixed the problem.
Best regards
Hi,
For a bit more explanation . . . both components use the CEGCore2 library and it is installed with either component. Unfortunately the library is sometimes updated in a new CF release but a new CC release is not made at the same time so the two get out of sync. You can always update the CC library by installing the latest CF release (and then uninstalling it if you don't need it). Not ideal but it works.
Bob
For a bit more explanation . . . both components use the CEGCore2 library and it is installed with either component. Unfortunately the library is sometimes updated in a new CF release but a new CC release is not made at the same time so the two get out of sync. You can always update the CC library by installing the latest CF release (and then uninstalling it if you don't need it). Not ideal but it works.
Bob
The issue is that the switch function had a glitch which was fixed in
the latest CF release but CC did not get the same fix yet, installing CF
had updated the shared lib files and fixed the problem.
Ok, thank you Max for the clarification.
So, generally speaking, I don't need to install both CF and CC if I only need CC.
maxx
This topic is locked and no more replies can be posted.