When trying to use the Textstring Array I run into trouble.
I have created a new DataType, set the Render control to the uComponent: Textstring Array, created two labels, minimum rows is 1, maximum rows is -1, but I don't think the problem is in there.
I've added this DataType as a property to a Document Type. So far, so good.
Now when I want to fill the property with values in the Content, I cannot add a new row (or remove and drag for as far as I can tell). Checking the JavaScript console it states;
Fout: TypeError: jQuery.textstringArray is not a constructor
Although the same functionality when configuring the labels/columns works like a charm.
Thanks Gerald. Just checking that the only JavaScript error is:
Fout: TypeError: jQuery.textstringArray is not a constructor
... nothing before that one?
Seems strange that the JavaScript for Textstring Array isn't loaded as it is embedded with the rest of the code. I'll take a look over the code, see if there's anything suspect.
Nope, nothing before that besides a bunch of CSS warnings.
I've just did some further testing and the problem seems to be the combination with another property. And my guess is the Google Map DataType (from the package repository).
When I add the Textstring Array DataType to another DocumentType with no other properties, it works! But when I add the Textstring Array DataType to my targeted DocumentType (which already has a Google Map DataType property, among 'normal' DataTypes like some Textstrings, Richtext edits, etc.) it doesn't work.
So I'm starting to get the idea that the script that loads the Google Map for setting it's marker, and the script for adding new strings to the array don't like each other that much!
Following up on this, I've tried testing Google Maps and Textstring Array on the same DocType and didn't find any issues. I played around with each data-type, see if different options could break it, but no joy - they work as expected.
Any other 3rd-party packages that could be impacting it? (I'm pretty much guessing now - sorry)
Thank you for your efforts. After your message I went to further investigate on what is going wrong.
I have some good news, I have identified the evil-do'er! I am also using a package named Opening Hours. When I add this to my DocType things stop working. I also noticed (don't know if it is any use to you) that when things aren't working the minus and drag button are visible while normally they would not be when there is only one row.
Hope this helps!
- edit -
I've checked out the Opening Hours editor. One of the first lines is
// Make sure the jQuery this data type is using does not // conflict with other versions of jQuery var jq151 = jQuery.noConflict(true);
When I set the noConflict parameter to false, it works!
Can't use Textstring Array DataType
When trying to use the Textstring Array I run into trouble.
I have created a new DataType, set the Render control to the uComponent: Textstring Array, created two labels, minimum rows is 1, maximum rows is -1, but I don't think the problem is in there.
I've added this DataType as a property to a Document Type. So far, so good.
Now when I want to fill the property with values in the Content, I cannot add a new row (or remove and drag for as far as I can tell). Checking the JavaScript console it states;
Fout: TypeError: jQuery.textstringArray is not a constructor
Although the same functionality when configuring the labels/columns works like a charm.
Any thoughts on this?
Thanks!
Hi Gerald,
Thanks for reporting this. Sounds like a JavaScript error, not sure what might be causing it, (it could be Textstring Array or something else?)
Which web-browser are you using? Do you get any other JavaScript errors for the edit-content page?
Thanks, Lee.
Hi Lee,
Indeed a JavaScript error, seems like the editor somehow refuses.
I'm using Firefox (latest version) but also tested in Opera, same result. No other (JavaScript) errors anywhere else!
Thanks!
Thanks Gerald. Just checking that the only JavaScript error is:
... nothing before that one?
Seems strange that the JavaScript for Textstring Array isn't loaded as it is embedded with the rest of the code. I'll take a look over the code, see if there's anything suspect.
Cheers, Lee.
Nope, nothing before that besides a bunch of CSS warnings.
I've just did some further testing and the problem seems to be the combination with another property. And my guess is the Google Map DataType (from the package repository).
When I add the Textstring Array DataType to another DocumentType with no other properties, it works!
But when I add the Textstring Array DataType to my targeted DocumentType (which already has a Google Map DataType property, among 'normal' DataTypes like some Textstrings, Richtext edits, etc.) it doesn't work.
So I'm starting to get the idea that the script that loads the Google Map for setting it's marker, and the script for adding new strings to the array don't like each other that much!
Luckily, I help develop the GoogleMaps data-type package too! So I'll take a look at both packages, see why they aren't working nicely together.
Cheers, Lee.
Hi Gerald,
Following up on this, I've tried testing Google Maps and Textstring Array on the same DocType and didn't find any issues. I played around with each data-type, see if different options could break it, but no joy - they work as expected.
Any other 3rd-party packages that could be impacting it? (I'm pretty much guessing now - sorry)
Thanks, Lee.
Hi Lee,
Thank you for your efforts. After your message I went to further investigate on what is going wrong.
I have some good news, I have identified the evil-do'er! I am also using a package named Opening Hours.
When I add this to my DocType things stop working. I also noticed (don't know if it is any use to you) that when things aren't working the minus and drag button are visible while normally they would not be when there is only one row.
Hope this helps!
- edit -
I've checked out the Opening Hours editor. One of the first lines is
// Make sure the jQuery this data type is using does not
// conflict with other versions of jQuery
var jq151 = jQuery.noConflict(true);
When I set the noConflict parameter to false, it works!
is working on a reply...