I am having a curious problem in Drupal 7, related to Taxonomy translation.
I am using a taxonomy vocabulary whose terms are localized. In order to differ taxonomy terms from one another (so the term names can all have different names), I am using an extra field called "Display Name". Since I have to show the names of the taxonomy terms and some of them have the same name (and I already had problems with that), I opted for using this extra field. And I found out that I can enable translation for this field only, through an option named "Enable Translation" in field settings.
Then, I have translated these terms using this option named "Enable Translation". I found that it is a batch operation that is activated when you enable it, allowing you to set up translated terms via the interface provided by Taxonomy.
However, after updating the website, I found out that my terms using this "Display Name" field disappeared. And I can't seem to find the problem... It doesn't seem like something is missing in my feature but, since it is a batch operation, it will only be effective in the environment this batch is executed, right?
Maybe this already happened to someone else but, after a thorough research, I have found no valuable information about it. I appreciate any help you may provide!
Related
I would like to create a data entry form in Drupal 7 that is similar to Filemaker's List View. List View is a view that contains many records on a page. When Submit button is clicked, data entered in the fields will be assigned to the individual records.
For example, I have a list of students' names and a column field of grade type. The student's name will be created from Drupal View's filtering, but the grade field will be empty waiting for me to key in.
What is the proper Drupal's module that can enable this functionality? Or what can I do to create this functionality.
This approach is closer to your original request, im testing this out now and I think it should more than do the trick, much more interestingly too.
http://drupal.org/project/slickgrid
Edit:
I highly recommend trying this its awesome!!
A couple quick tips
Be sure to also install http://drupal.org/project/title so you can reset the title (make it a field), Basically with this editor you can only edit actual fields, so same goes for location module, you'll need to use the field option rather than node option.
One possible downer, at least for my site, it appears the drupal module does not support jquery 1.7 which my site uses, so a few buttons etc don't work as expected, also the drupal module does not support the latest slickgrid release either. I'd like to look into fixing that but I dont have the time just yet, possibly someone will before long. If jquery 1.7 is not required for your site then none of that will be a problem for you.
I just figured how to do something similar, although I went about it a different way then I think would be the most desirable, at any rate what I did works perfectly for me at the moment.
What I did...
Used a google docs spreadsheet for data entry, exported a CSV file, then used Feeds module to Import and Map it to my desired content type. I was even able to get location, taxonomy & image fields to map.
Modules & Stuff Used...
Feeds http://drupal.org/project/feeds which also includes Feeds
Importer, you'll want to read through all the instructions to be sure
you understand the import methodology, I could never explain it all
here!
Feeds Tamper http://drupal.org/project/feeds_tamper , I used this to
explode the cell which had a | separated | list of taxonomy terms (dont use comma), the
nice side effect is if the term doesn't exist it creates it for you!
Spreadsheet - Personally I created a Google Docs Spreadsheet, any type
will do. This spreadsheet has every field you want to map to fields
in your content type.
"More Better"
Currently I am on the hunt for a simple backend UI way to do this, but this is what I've settled on for now. I just couldn't imagine hand entering hundreds of nodes, page submit after page submit! I will post back if I figure another way to do it. Good luck!
I have just started with
https://www.drupal.org/project/editableviews
which enables the creation of views where all the fields are editable, including when no data exists in the related entity. At the first url is also documentation.
There a screencast which shows more
https://www.youtube.com/watch?v=g_D4z4Bw6iw
I am working with the commerce module to create an online store. I am modifying the products .install file to create a content type (as I have been told this is required) and as part of that content type, I need to create lots of fields. The list will be around 50-60 different pieces of information.
Ideally I would like to store these in a single table with the productID at the beginning and all the other information along, but this doesn't seem to be the case; all the fields are stored in different tables.
I noticed that the "Address" module that is also used with commerce creates a field-type that has about 15 different values all stored in the same box. How is this possible? I noticed that if I set the cardinality up to 5 for example, it creates different rows. I just want a table with the following:
ID - value1 - value2 - value3 etc etc.
I also don't need any modules/extensions as this all needs to be written in the files. I also don't think that changing to the mongoDB ( I think ) is an option, so what are my options in this situation?
That's not how the Drupal field system works I'm afraid, one field == one table (well actually 2 tables if you include the revision table for each field).
The Address module uses hook_field_schema() to define several columns for that particular field (have a look in address.install and you'll see what I mean).
So if you want to put everything in one table you'll simply have to define your own field type (see the examples module, specifically field_example for help with that).
Bear in mind though that the number of columns you define in hook_field_schema() will be static once the module is installed, and the only way you're going to be able to increase/decrease it is with an _update hook for your custom module.
Also, if you're hacking at files that are included in the Commerce module...stop!: Commerce is still very much in it's infancy and you will likely have to update it soon...once you've done that your code changes will be gone and there's a good chance your site will be in an inconsistent state.
The whole point to Drupal is that everything is hooked/farmed out so that it can be altered by other parts of the system. There's nothing you can change in product.install that can't be done by implementing a Drupal hook in another module.
If you're unsure, post another question detailing what you're trying to accomplish by directly editing a contrib module file and one of the Drupal gurus on SO will point you in the right direction :-)
EDIT
Just to say I've been working with Ubercart in Drupal 7 for quite some time now and find it a very, very good solution (a lot of Commerce contributed modules are still in dev/alpha/beta; this is less so for Ubercart contributed modules). It might be worth a look.
Some more info
I think you've basically got two options here but either way you'll need to create a custom module (excellent set of instructions here).
Option 1: Create a custom field
If you're a Drupal coding beginner I'd suggest this is probably the easiest way to accomplish what you want, but it's still not totally straight forward. Grab the field_example module from the Drupal Examples module link above and have a look in the .install file, specifically the field_example_field_schema() function. That defines the columns that will be in the table for that field. Then have a look in field_example.module...pretty much every function that's commented with Implements hook_x is one that you're going to want to copy into your module and tweak for your own needs.
I think this will be easier because Drupal will handle the table/form field creation for you
so you don't have to mess with the database, schema or form APIs.
Option 2: Create a custom module
This option involves implementing your own table (like you suggest in your comment) where the primary key would be the entity ID of the product and would also contain all of your custom columns. (See the Schema API documentation for help with this).
Then you'd implement hook_form_alter() to add the form fields necessary for a user to input the data, and then implement hook_node_insert() and hook_node_update() to persist this data to your database table. It's quite hard to go into any more detail without actually writing code and it's quite a bit of code!
Hope that helps, sorry I can't be any more specific but it's not easy without knowing all the ins and outs of the situation
in my view's exposed filters block the taxonomy terms are showed only in the original language version (in English).
Vocabulary is set to Localize terms.
The terms are translated via Translation Table.
All the other content (Views, nodes, translated strings etc.) is showed correctly (in German).
I'd expect them to appear in current language, however.
Here for instance, I'd expect to have German Sommer 10 instead of English Summer 10.
Do You have any idea how to solve it?
I use Drupal 6 and Views 2.10
I have found a patch to make taxonomy terms appear translated.
Unfortunately, it seems that the it's not a bug but just a not (yet) implemented feature (see this and that).
(...) The reason that there is a difference in node behavior is that the module you're using for taxonomy translation modifies the node. It would have to modify the view as well. Drupal core doesn't support translating vocabulary. I am happy to (...) make sure it has the capability to help with Views translation, but you must understand that this is:
1) not automatic
2) not views' responsibility.
Let's say
Taxonomy_A is associated to Node_Type_A
Taxonomy_B is associated to Node_Type_B.
AND
Both Taxonomy_A and Taxonomy_B have a term called 'yellow'.
Is it possible to make terms 'yellow' synonymous, so that if I'm looking at a list of 'yellow' stuff, I'm seeing content of both types (Node_Type_A, and Node_Type_B)?
Progress:
Unfortunately it is not possible for taxonomy terms to behave in Drupal as described in my question (at least not without forcing it):
It is clear by taking a look at the terms_related table that it would be possible to create paths that forced related terms together using the taxonomy_get_related function regardless of what vocabulary the term belongs to:
However, the way to get to these terms is through the taxonomy_get_related function in the taxonomy module. This function is not used at all in drupal-6 core except to define it. (I did find it once in the ctools module).
I think you are doing it wrong. I mean using taxonomy wrong, not technically, but as a concept. Ask yourself why do you have 2 vocabularies with term yellow? Both are colour. they belong to same dictionary. Maybe tell little more of what you are trying to make.
Maybe you need to change setup so you don't associate one dictionary to one content type, maybe CCK, views and this module can do what you need http://drupal.org/project/content_taxonomy
I have a taxonomy vocab assigned to a content type in Drupal 6. I've then exposed (using "is one of") it as a field in views which allows a user to search via keywords.
The problem is when it runs the query it is first referencing the term so instead of using a like statement it looks the term up in the taxonomy table and brings back it's ID. So if a user searched for one term that exists and another that doesn't the whole thing fails rather than bringing back relevant results for the first term that exists.
Is there anyway to do partial matching using views?
Thanks
For anyone looking for the answer the best implementation I could find was Apache Solr.
Relatively easy to setup if you have your own server.
More information can be found here - http://drupal.org/project/apachesolr