I'm trying to insert a token with the text interface. When I press insert the edit page i reloaded and nothing is inserted.
Even more: when the "insert token" is enable for a particular field the node cannot be saved. Pressing the save button, in the "edit node", only refresh the page.
Another unusual behaviour: two insert-token drop-down menu are showed behind the field with the insert-token enabled.
The field is of long-text type.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | double_tokens.jpg | 87.68 KB | dimon00 |
| #7 | doubletokens.png | 33.43 KB | dimon00 |
| #3 | doubledropdown.png | 31.34 KB | dimon00 |
Comments
Comment #1
attiks commentedComment #2
jelle_sI could reproduce the first behaviour, but failed to reproduce the second (multiple drop-downs). The first should be fixed in the latest dev now. Could you post the exact steps I need to take to get the multiple drop-downs?
Comment #3
dimon00 commentedIn "Content types" I edit my node type.
In "manage field" -> edit for my custom field. I tick "Use Token Insert for this field " then save.
Now I open of of my node of that type and click on "edit".
The screenshot shows the double drop-down.
Comment #4
jelle_sHave you tried using the latest dev version? I'm stunned by this as I've never seen this behaviour before with token insert
Comment #5
dimon00 commentedI fear I'm using the last 7.x-2.x-dev.
Any log file I can look into?
Any test I can perform?
Comment #6
jelle_sDid you run update.php (we changed some variable names in the database recently)? But I can hardly imagine that would be the problem.
Ok, so you enabled the module and didn't change any settings for token insert right?
Do you have any other modules enabled that might interfere with our javascript or a module that provides some extra tokens?
The only other explanation I can think of is that token_insert_text_combobox is called twice for that form element.
Could you do a watchdog or something in that function (token_insert_text.module line +/- 65) to check if this function is called with the same element twice?
Comment #7
dimon00 commentedFrom what I can see, at some point, something has duplicated my tokens.
For every field I have two tokens in the form:
field-my-field
field_my_field
New field I'm adding now doesn't seem to be duplicated.
Any idea on how to clear the situation?
Comment #8
jelle_sCould you go to admin/help/token and see if they appear twice there too?
Where is this screenshot taken from? I do not recognize the page
Comment #9
dimon00 commentedThe screenshot above is taken from panels (inserting content in a panel).
Here the screenshot from help.
Comment #10
jelle_sI have no clue why the tokens are listed twice. But I'm not sure if this is a token insert problem. However this shouldn't/couldn't be the reason the token insert form is shown twice per field. Could you do a watchdog or something in token_insert_text_combobox (token_insert_text.module line +/- 65) to check if this function is called with the same element twice? Could you also double check the token insert version? I seem to remember we had this problem in the 1.x branch. So if you could check if you have token_insert-2.x-dev?
Comment #11
jelle_sChanged the title for clarity
Comment #12
jelle_sHi,
Could you try the latest dev version (in 12 hours from now). I took a good look at the code and according to the code it would have been possible that the form was added twice on fields with text format selection (although it didn't happen to me somehow). Don't forget to clear your cache (a couple of times) after you've downloaded it. I really hope this fixes the problem :-)
Comment #13
dimon00 commentedNo problem.
I'm going to test your new release tomorrow.
However I'm now worried about those duplicated tokens... :(
If you get any ideas about this other issue make me know. ;)
Comment #14
dimon00 commentedI have tested the new dev version and the insert form shows only once.
unfortunately the save problem is still there.
i cannot save a node if the insert token is active.
Comment #15
jelle_sThat's strange,
everything works just fine here.
What are your basic settings? (field name, field type, token insert per role or not, ...)
Comment #16
dimon00 commentedToken, and token insert UI enabled.
Permission to use these modules only to administrator.
The filed I'm testing on:
Label: Link iframe
Name: field_iframelink
Field: Long text
widget: Text area (multiple rows)
text format is "tokens"
I set "Use Token Insert for this field" and then modify a node containing this kind of field.
The template of my node type should be overridden using panels to change the display layout.
Comment #17
jelle_sSo, does this mean the token insert functionality itself works, but you just can't save the node?
do you get any errors (javascript, php, ...)?
Comment #18
dimon00 commentedCorrect.
The function works: the token is inserted in my field.
But when I try to save, the edit page is just reloaded without any error.
Comment #19
jelle_sThat's very strange behaviour... and when you disable token_insert_text (only this submodule) you don't have this behaviour? or do you need to disable both token_insert and token_insert_text? (just trying to narrow things down)
Comment #20
dimon00 commentedSorry. I'm a bit confused by your question.
I have 3 modules: Token insert (text), Token insert (wysiwyg), Token insert UI.
Token insert (wysiwyg) is always disabled.
If I enable "token insert UI" I don't see any option to enable token insert in my field.
So I believe I need at least Token insert (text). With this module enabled (and only this one) I have the issue.
Comment #21
jelle_sOh yes, my fault.
Token Insert UI is what you would call the "Main module" required by both Token Insert (text) and Token Insert (wysiwyg).
From your explanation this is a Token Insert (text) issue I think. Although I'm not sure why, normally we just add elements to the form, without changing any submit functionality... I'll have a look into it.
Comment #22
jelle_sfrom #16:
Could you disable panels or go to the "normal" node form and see if it works there?
Comment #23
dimon00 commentedFor a not-panels node the behaviour is different.
When I click "insert" the node is automatically saved.
No token is added in the field.
Comment #24
jelle_suh... ok, do you have any JS errors there? Can you give me some kind of access to both forms so I can test for myself and see what happens?
Comment #25
dimon00 commentedI can give you access to the development site of this.
I'm gonna contact you privately with a temporary account if you it is ok for you.
Comment #26
jelle_syes I think that would help. I will try my best to solve this issue
Comment #27
dimon00 commentedHave you received the account?
Comment #28
jelle_ssetting this to cannot reproduce since you've solved it differently and I can't seem to reproduce this :-)