Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gerald Versluis 4 posts 25 karma points
    Aug 20, 2012 @ 14:27
    Gerald Versluis
    0

    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!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 20, 2012 @ 17:01
    Lee Kelleher
    0

    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.

  • Gerald Versluis 4 posts 25 karma points
    Aug 20, 2012 @ 18:36
    Gerald Versluis
    0

    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!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 20, 2012 @ 20:31
    Lee Kelleher
    0

    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.

    Cheers, Lee.

  • Gerald Versluis 4 posts 25 karma points
    Aug 21, 2012 @ 09:11
    Gerald Versluis
    0

    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!

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 21, 2012 @ 10:53
    Lee Kelleher
    0

    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.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Aug 23, 2012 @ 21:31
    Lee Kelleher
    0

    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.

  • Gerald Versluis 4 posts 25 karma points
    Aug 24, 2012 @ 09:05
    Gerald Versluis
    1

    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! 

Please Sign in or register to post replies

Write your reply to:

Draft