Results 1 to 13 of 13

Thread: Taxonomy additions not showing in Select

  1. #1
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Taxonomy additions not showing in Select

    I've gone from TYPOlight webCMS 2.7.6 to Contao Open Source CMS 2.9.RC1

    Whether this situation was there before I'm not too sure (as I have come back to my development after some months) but I now noticed that 3 recent additions to my taxonomy (in the Location part of the tree) do not appear in the select drop down list in a Form. (see below which is a combined image of the taxonomy screen and the select list from the Add form screen)

    [attachment=0:9icwpgpl]typo tax.jpg[/attachment:9icwpgpl]

    BTW, Calalog's FE Edit form does show it correctly but I can't use Calalog's FE Add form as I can't get it to set {{xxx}} tags for hidden fields so I'm using my own Add form.

  2. #2
    User
    Join Date
    06-29-09.
    Posts
    271

    Default Re: Taxonomy additions not showing in Select

    This question belongs in the catalog thread.

    Catalog usually only shows options that actually exist for as far as I know. So you need at least one item using 5, 6 or 7 for them to show up.

  3. #3
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Taxonomy additions not showing in Select

    Thanks for responding Vera.

    This question belongs in the catalog thread.
    My problem is with the Form Generator function which as far as I recall is a base feature of Contao.

    I just happened to mention Catalog, as Catalog is correctly retrieving the taxonomy data, which would indicate that the taxonomy data is OK.

    In the Form Generator definition under "Options from database" I have selected:

    Database field (label): tl_taxonomy.name
    Database field (value): tl_taxonomy.id
    Condition: tl_taxonomy.type='Location'

    In the Taxonomy, the first 4 Locations have IDs of 12, 13, 14 & 15 and the next 3 are 23, 25 & 24
    The 6 x Species are ID nos. 17 to 22

  4. #4
    User
    Join Date
    06-29-09.
    Posts
    271

    Default Re: Taxonomy additions not showing in Select

    Excuse me, I must have misread ops:

    What happens if you add items and move the existing that do show around? Do changes to the names get changed in the frontend form as well?

  5. #5
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Taxonomy additions not showing in Select

    Quote Originally Posted by Vera
    Excuse me, I must have misread ops:
    No problem. This is a many faceted system.

    Good suggestion. I moved an item to between the 3rd and 4th list item and I added an item between the 1st and 2nd and both made no difference - still the original 4 items. Tried on IE and FF to be sure and yes, I did clear the cache

    Then I thought I would change the form field from Select (DB) to text it corrupted things:

    Fatal error: Uncaught exception Exception with message Query error: Unknown table 'tl_taxonomy' in where clause (SELECT id, spotter, id FROM cat_fobmcp_spotted WHERE tl_taxonomy.type='Location' ORDER BY cat_fobmcp_spotted.spotter) thrown in F:\contao-2.9.RC1\system\libraries\Database.php on line 642

    I get this whether I try to access the Form via the BE or FE - oh dear!

    When I went and had a look at the tl_taxonomy table I did discover that the type field was blank for the new items that were added, so I now added the type data for these (using SQLyog)

    I then looked at the tl_formfield database and found the Location lookup entry corrupted so I restored the field data from a backup. Now it's working!

    As a final check I added another item in the Taxonomy under Location and sure enough it got added without the type field being set.

    Looks like a bug in taxonomy. I'm on version 0.1.7 stable build 5 Not approved for Contao 2.9.RC1

    At least I can manually fix the table when I add new items to the taxonomy, which will be infrequent.

    Not too sure if I can raise it as a bug when it's not supported under Contao 2.9.RC1

  6. #6
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Taxonomy additions not showing in Select

    This is not a Contao problem, as the Form Generator doesn't support retrieving options from a database for a SELECT form field, you have to manually type the options in. If you have this option, you are most likely using an extension to get this right. Remember what extensions are you using, and then direct the question to the Extensions Support area, as this isn't a Contao core function.

  7. #7
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Taxonomy additions not showing in Select

    This may or may not help...and may be of interest to you Thyon.
    I requested a new field type (Database Select) in Form Generator a few days ago, and its been accepted.
    So presumably soon you will be able to retrieve options from a database for a SELECT form field via the Form Generator.

    Ticket is http://dev.contao.org/issues/2227

  8. #8
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Taxonomy additions not showing in Select

    I saw that... Its like Andreas' Database Select Form extension....

  9. #9
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Taxonomy additions not showing in Select

    Quote Originally Posted by thyon
    This is not a Contao problem, as the Form Generator doesn't support retrieving options from a database for a SELECT form field, you have to manually type the options in. If you have this option, you are most likely using an extension to get this right. Remember what extensions are you using, and then direct the question to the Extensions Support area, as this isn't a Contao core function.
    Thyon, sorry to post in the wrong area but it seemed to me to be a Taxonomy problem and I thought that was core. As I tried to say, adding items to the Taxonomy and then checking the Taxonomy table tl_taxonomy table showed that the type field was blank for the new items that were added. See screen shot where I added a new "New location item alias" under the Location tree.
    [attachment=1:1pu5a2i6]taxonomy add.jpg[/attachment:1pu5a2i6]
    but the type field is blank
    [attachment=0:1pu5a2i6]taxonomy.jpg[/attachment:1pu5a2i6]

    Maybe you are saying that the type field in the tl_taxonomy table is not core Contao but added by the Form Generator. If so, I don't see how a user can possibly know that

  10. #10
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Taxonomy additions not showing in Select

    1. The Taxonomy is not a core module, its only a support module for the Catalog.
    2. There is no type field in the modules/taxonomy/config/database.sql... The BE Taxonomy module also doesn't create a "type" field, so I'm not sure where you got this? You must have somehow created this field -- but how? The taxonomy uses the pid field to identify the parent by the taxonomy id. Taxonomy doesn't have any FE modules, so its not possible to edit add to it in the FE. Taxonomy items are supposed to be added by a BE user (not FE).
    3. You have used an extension in the Form Generator to create a DB Select list, so that's also not core - Since a core SELECT can only do manual options.

  11. #11
    User
    Join Date
    01-22-10.
    Location
    Trowbridge, UK
    Posts
    61

    Default Re: Taxonomy additions not showing in Select

    Thanks thyon for putting me straight

    1. If you or someone else want to move this thread then I'm Ok with that.
    2. I've no idea how the type field came about. It would be pointless to have added it with no way to update it other than direct to the database. There is no need for FE users to update the Taxonomy as entries should be controlled.
    3. I need to understand this aspect.....

    I have a love/hate relationship with this software. In many ways it's very good and powerful, perhaps seductively so in the way one can link all the components together, but this can be a trap for the less knowledgeable person. It seems more geared up for developers who can get a deep understanding of the inner workings. Maybe if I understood German then more learning material would be accessible and negate having to understand the inner workings and ask for help in these forums.

    I came to TL because of Catalog but ultimately the aim is to open the web-site to school children who can add their own content as part of school projects. I wondering if they (and their teachers) are going to get to grips with being BE editors. I probably need to set up a little trial.

    Anyway. my Catalog app has gone into beta testing (thank you for Catalog and your help along the way) and it awaits user feedback and the fixing of a couple of bugs within TL.

  12. #12
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Taxonomy additions not showing in Select

    hey Alan

    There is good English documentation on the Google site, linked from the Extension installation's update screen. There you will find 3 full wikis - Once covering BE, one FE modules and filtering and then also another covering advanced templating. There might be a feature of two missing here and there, but it has the basics in there... And the first thing you get is a warning in all the wikis that this is an advanced module -- definitely not for beginners.

    The Catalog and Catalog Extension modules are advanced modules and will require intermediate knowledge of PHP, HTML/CSS
    in order to create catalog that displays the way you really need it. To create advanced displays, you will need to
    understand PHP array structures provided in the TPL files.
    *NOTE: This is not a module for beginners*.
    The Catalog module is a simple stop-gap to assist beginners with quickly getting up a custom application
    without having to write any code. However, the Catalog module is obviously NOT capable of working for all
    situations, at some point you have to get yourself dirty with PHP programming and just write your own
    TL application, which is a bit of work and a lot of files, but easier than you might think.

  13. #13
    Experienced user
    Join Date
    06-10-09.
    Location
    Cape Town, South Africa
    Posts
    1,387

    Default Re: Taxonomy additions not showing in Select

    to answer some of your questions. Let users add items using the BE, not the FE, this saves you a LOT of time. Otherwise you have to setup a FE system just to edit BE items, which is already possible. The BE is a lot more advanced in allowing for editing and permissions than the FE.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •