I wanted to fix weburl to have the field display its label, but then I noticed the module was not fully up-to-date with the latest CCK hooks. Here is my attempt at updating it. This fixes the labelling as well. ;-)

Comments

coupet’s picture

updated to latest weburl cvs then applied patch:

$ patch -p0 -u < weburl_update.patch
patching file weburl.module
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 93.
1 out of 2 hunks FAILED -- saving rejects to file weburl.module.rej

coupet’s picture

patching file weburl.module
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 93.
1 out of 2 hunks FAILED -- saving rejects to file weburl.module.rej

David Lesieur’s picture

StatusFileSize
new9.31 KB

I'm not sure what when wrong... Sorry for that. Here is a re-rolled patch.

coupet’s picture

applied patch, ok; entered 'http://www.google.com' in weburl field; submit and the messages are displayed:

* user warning: Unknown column 'field_web_url_value' in 'field list' query: UPDATE node_content_painting SET field_web_url_value = 'http://www.google.com' WHERE vid = 33 AND nid = 33 in /usr/local/apache/htdocs/sitename.com/dpa/includes/database.mysql.inc on line 120.
* user warning: Unknown column 'field_web_url_value' in 'field list' query: SELECT field_web_url_value AS value FROM node_content_painting WHERE vid = 33 in /usr/local/apache/htdocs/sitename.com/dpa/includes/database.mysql.inc on line 120.

Note: Label is displayed coorectly but the value field is empty.

David Lesieur’s picture

Is that happening with a pre-existing weburl field? There might be an upgrade problem here.

coupet’s picture

yes, is happened with pre-existing weburl field?

I deleted the field and obtain error message (sorry did not record message!) unable to delete web_url_field ?

Created a new Web URL field and works fine.

David Lesieur’s picture

I'll try to fix that in weburl.install. Thanks for the testing!

David Lesieur’s picture

StatusFileSize
new11.86 KB

Here's a patch that includes both weburl.module and the updated weburl.install. Make sure to backup your db before testing this upgrade. ;-)

coupet’s picture

Applied latest patch weburl_1.patch to cvs weburl.module and weburl.install files.
I had to specify name of files to patch
Works great.

I selected multiple values and can only enter a maximum of 3 URL address.

Unable to add more than 3 URL address.

David Lesieur’s picture

The limit of 3 urls was there before. IMHO it is a separate issue from this one.

Thanks again for the testing! I hope this patch can be committed.

robertdouglass’s picture

Well, since I wrote the weburl filed I guess I should patch it too, eh? =) Will review and get it updated. I've also improved the regexps.

coupet’s picture

ref: cck cvs; weburl.module,v 1.8 2006/06/12 19:36:54

patch result follows:

$ patch -u -p0 < weburl_1.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /f/projects/drupal/cvs/contributions/modules/cck/weburl.install 2006-05-23 18:38:24.234375000 -0400
|+++ modules/cck/weburl.install 2006-05-23 18:28:19.906250000 -0400
--------------------------
File to patch: weburl.install
patching file weburl.install
can't find file to patch at input line 64
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /f/projects/drupal/cvs/contributions/modules/cck/weburl.module 2006-05-23 18:38:24.343750000 -0400
|+++ modules/cck/weburl.module 2006-05-23 18:28:19.890625000 -0400
--------------------------
File to patch: weburl.module
patching file weburl.module
Hunk #2 FAILED at 93.
1 out of 2 hunks FAILED -- saving rejects to file weburl.module.rej
$

coupet’s picture

try again!
ref: cck cvs; weburl.module,v 1.8 2006/06/12 19:36:54
patch result follows:

$ patch -u -p0 < weburl_1.patch 
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /f/projects/drupal/cvs/contributions/modules/cck/weburl.install    2006-05-23 18:38:24.234375000 -0400
|+++ modules/cck/weburl.install 2006-05-23 18:28:19.906250000 -0400
--------------------------
File to patch: weburl.install
patching file weburl.install
can't find file to patch at input line 64
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /f/projects/drupal/cvs/contributions/modules/cck/weburl.module     2006-05-23 18:38:24.343750000 -0400
|+++ modules/cck/weburl.module  2006-05-23 18:28:19.890625000 -0400
--------------------------
File to patch: weburl.module
patching file weburl.module
Hunk #2 FAILED at 93.
1 out of 2 hunks FAILED -- saving rejects to file weburl.module.rej
$
treksler’s picture

1) always add --dry-run to your patch command to see if there are no errors
2) you need to adjust your -p0 parameter ; try -p5

David Lesieur’s picture

@Robert: Yes, if you could review/update/commit the patch, that would be great! :-)

marcoBauli’s picture

i manually applied the patch:

  1. Fatal error: on upgrade.php i got error related to the "$fields = _content_fields();" on line 40.
  2. Removing the infamous "_" [content_fields();] got the upgrade to proceed.

  3. Warnings: for each of my content-types using the previous weburl field, i get the following:
    user warning: Duplicate entry '428' for key 1 query: INSERT INTO node_content_spot (vid, nid, field_url_forecasts_value) SELECT vid, nid, field_weburl FROM node_field_weburl_data WHERE field_name = 'field_url_forecasts' in /home/mysite/public_html/drupal/includes/database.mysql.inc on line 120.
  4. of course when loading a node with a previously filled weburl field a warning is thrown out again:
    Unknown column 'field_url_forecasts_value' in 'field list' query: SELECT field_url_forecasts_value AS value FROM node_content_spot WHERE vid = 461 in /home/kiteatla/public_html/drupal/includes/database.mysql.inc on line 120.

    Deleting and creating the weburl field again removes the error and shows output, but

  5. No description (help text) in submission form yet...or it's just me?

thx

David Lesieur’s picture

Status: Needs review » Needs work
David Lesieur’s picture

Status: Needs work » Closed (won't fix)

There is now a link module.