When the option: "Unlimited" (or 2 or more) is chosen in the number of values,
I can't put an URL with query ("?" character), as the URL gets cut off after the "?"

Example:
URL written: http://www.store.com/product.asp?id=12701
URL recorded: http://www.store.com/product.asp

This doesn't happen if I have just 1 value alowed for the Link field.

Please help!

Comments

danielapsmaior’s picture

With Devel module, I can see that the URL is being recorded twice. The first time, it's recorded properly and the second time, with this issue:

content_storage | DELETE FROM drupal_content_field_store WHERE vid = 273

content_write_record | INSERT INTO drupal_content_field_store (vid, nid, delta, field_store_url, field_store_title, field_store_attributes) VALUES (273, 273, 0, 'http://www.store.com/product.asp?id=12701', 'Store Name', 's:6:\"a:0:{}\";')

And seconds later:

content_storage | DELETE FROM drupal_content_field_store WHERE vid = 273

dblog_watchdog | INSERT INTO drupal_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:73:\"mysqli_real_escape_string() expects parameter 2 to be string, array given\";s:5:\"%file\";s:49:\"/var/www/drupal-6.31/includes/database.mysqli.inc\";s:5:\"%line\";i:329;}', 3, '', 'http://localhost/drupal-6.31/node/273/edit', 'http://localhost/drupal-6.31/node/273/edit', '127.0.0.1', 1399699636)

content_write_record | INSERT INTO drupal_content_field_store (vid, nid, delta, field_store_url, field_store_title, field_store_attributes) VALUES (273, 273, 0, 'http://www.store.com/product.asp', 'Store Name', 's:6:\"a:0:{}\";')

If someone could tell me how to debug this better, maybe I can find the bug in the code and fix it myself (and post it here, of course).

dqd’s picture

Priority: Major » Normal
Issue tags: -url cut

Before adding tags read the issue tag guidelines. Do NOT use tags for adding random keywords or duplicating any other fields.

Thanks for understanding.

Can you please try to reproduce this issue with the latest dev version of link module 6.x and report back? Since Drupal 8 comes out soon and link module already supports D6, D7 and D8 - we have to push all changes to the latest dev before releasing another D6 version of link field module.

Thanks for understanding and your report.

dqd’s picture

Status: Active » Postponed (maintainer needs more info)
danielapsmaior’s picture

OK, sorry for the keywords.

Trying to reproduce the error again, I found out that it doesn't happen when I create a new content type and then put a Link field in it. If I put a new Link field in an existing content type the issue still happens, and of course it happens in an existing Link field in an existing content type.

So, it seems an update problem... I did run update.php before and now again, but it still doesn't change anything in Link. Could you help me please?

Anonymous’s picture

I'm having this problem too. I have the link set up for one value though. The link field is in a field collection, and in field collection the formatter is set to link an image to the link field. I have the field collection as being able to have multiple values.

Anonymous’s picture

Version: 6.x-2.11 » 7.x-1.3