Not everyone wants to use the Checker feature, so let's move that code into a contrib to save module load time.

CommentFileSizeAuthor
#7 _weblinks_checker.node_nid.patch.txt761 bytesjonathan1055

Comments

nancydru’s picture

Issue tags: +Roadmap

tagging

jonathan1055’s picture

That sounds like a good idea. I have currently got a patch which adds a bit of extra functionality and more options to the checker. I probably would have posted it here in a few days time, just doing some testing on it now. Would you like me to move the code to a sub-module in the same patch? Or should I check with you that you want to include my additions first, get them done and committed, then we move it to a sub-module after?

Jonathan

nancydru’s picture

We need to see what that functionality is before we can decide whether to include it or make it a sub-module. We'd love to see it.

rmiddle’s picture

Status: Postponed » Active

jonathan1055,

Please do the patch against current code. I prefer 10 smaller signal step patches to 1 larger doing 10 thing patches.

NancyDru,

I agree this is a great idea to move this out. I would like to see this done before 6.x-2.x is released. After the problems with had when I moved weblinks_blocks out I think something like this need to be done in a major version change.

Thanks
Robert

nancydru’s picture

I'm going to start on this today.

nancydru’s picture

Assigned: Unassigned » nancydru
Status: Active » Fixed

Committed to 6.x-2.0-dev

Johnathan, you probably need to rework your mods. Please open a new issue for the extra stuff.

jonathan1055’s picture

Priority: Minor » Normal
Status: Fixed » Needs review
StatusFileSize
new761 bytes

Hi Nancy,

In re-making my checker enhancements, I found a slight problem in weblinks_checker_validate() due to the code being moved out from weblinks_form(). The $node object is not directly available in weblinks_checker_validate() so the URL duplication test for $node->nid != $url_exists_nid is always true and the duplicate error/warning is always triggered. Hence you can't actually add a new weblink or edit an existing one.

It is simple to fix, because $node->nid can be replaced with $form['#node']->nid

The attached patch makes this change, and also removes a trailing space on a previous line (as per coding standards courtesy of the coder module standards checker). I rolled it from the weblinks main directory, is that right?

I wasn't sure of the etiquette of re-opening a fixed patch, but seeing as it was only recently fixed, I thought this was the best place to report this.

Jonathan

nancydru’s picture

Status: Needs review » Fixed

Thanks, Johnathan. I could have sworn I had made that change...

nancydru’s picture

Status: Fixed » Closed (fixed)