Notice: Undefined offset: 0 in _freelinking_prepopulate_default_node_type() (line 127 of /home/mysite/sites/all/modules/freelinking/modules/freelinking_prepopulate/freelinking_prepopulate.module).
Notice: Undefined variable: extra_description in freelinking_nodetitle_settings() (line 89 of /home/mysite/sites/all/modules/freelinking/plugins/freelinking_nodetitle.inc).

Two error messages I get whenever enabling the Freelinking Prepopulate module.
Am too inexperienced with this to solve it, but maybe someone else isn't?

Comments

misc’s picture

I get the same error.

hillman’s picture

I do as well.

misc’s picture

Posted a patch for this and some other issues I had here: http://drupal.org/node/1351932#comment-5287414

iolartes’s picture

Thank you for the patch. It solved most of my problems. However, I still get some warnings on the plugin usage. Whenever I update a page to include new links, I got the following:

Notice: Undefined variable: object in freelinking_prepopulate_fields_from_page() (line 43 of /home/content/97/8175197/html/tgunpla-d/sites/all/modules/freelinking/modules/freelinking_prepopulate/freelinking_prepopulate.utilities.inc).
Notice: Trying to get property of non-object in freelinking_prepopulate_fields_from_page() (line 43 of /home/content/97/8175197/html/tgunpla-d/sites/all/modules/freelinking/modules/freelinking_prepopulate/freelinking_prepopulate.utilities.inc).
Notice: Undefined variable: node in freelinking_prepopulate_fields_from_page() (line 51 of /home/content/97/8175197/html/tgunpla-d/sites/all/modules/freelinking/modules/freelinking_prepopulate/freelinking_prepopulate.utilities.inc).
Notice: Trying to get property of non-object in freelinking_prepopulate_fields_from_page() (line 51 of /home/content/97/8175197/html/tgunpla-d/sites/all/modules/freelinking/modules/freelinking_prepopulate/freelinking_prepopulate.utilities.inc).

I don't know if this error is related to my usage of custom node type for the new page.

misc’s picture

Do you use the dev branch, or the latest stable release? The patch should work with latest dev from git.

iolartes’s picture

I'm usign freelinking 7.x-3.x-dev and freelinking-prepopulate 7.x-3.x-dev.

misc’s picture

Sorry, but I can not reproduce the error. Are you sure that the patch were applied to all files?

iolartes’s picture

I don't know how I can confirm that. Please, could you explain me how can I check that? Thanks

misc’s picture

Do you get any messages when you apply the patch, if so, what?

iolartes’s picture

I did reinstall the dev versions of freelinking and prepopulate thinking that the problem was due to an error with the patch install. I installed the patch using the patch command in ubuntu and I got the following:

patching file freelinking.api.php
Hunk #1 FAILED at 15.
1 out of 1 hunk FAILED -- saving rejects to file freelinking.api.php.rej
patching file freelinking.module
Hunk #1 FAILED at 45.
Hunk #2 FAILED at 191.
Hunk #3 FAILED at 259.
Hunk #4 FAILED at 389.
4 out of 4 hunks FAILED -- saving rejects to file freelinking.module.rej
patching file freelinking_prepopulate.info
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file freelinking_prepopulate.info.rej
patching file freelinking_prepopulate.module
Hunk #1 FAILED at 32.
Hunk #2 FAILED at 60.
Hunk #3 FAILED at 75.
Hunk #4 FAILED at 101.
Hunk #5 FAILED at 115.
Hunk #6 FAILED at 123.
6 out of 6 hunks FAILED -- saving rejects to file freelinking_prepopulate.module.rej
patching file freelinking_prepopulate.utilities.inc
Hunk #1 FAILED at 27.
Hunk #2 FAILED at 60.
Hunk #3 FAILED at 75.
Hunk #4 FAILED at 101.
Hunk #5 FAILED at 182.
5 out of 5 hunks FAILED -- saving rejects to file freelinking_prepopulate.utilities.inc.rej
patching file freelinking_nodetitle.inc
Hunk #1 FAILED at 19.
Hunk #2 FAILED at 27.
Hunk #3 FAILED at 53.
Hunk #4 FAILED at 68.
Hunk #5 FAILED at 125.
Hunk #6 FAILED at 167.
Hunk #7 FAILED at 175.
7 out of 7 hunks FAILED -- saving rejects to file freelinking_nodetitle.inc.rej
misc’s picture

I think the problem is how you apply the patch. Could you tell how you use the patch program? Personally I use git apply - but that only works if you work in the modules git branch.

iolartes’s picture

Originally I used git. This last time when I restored the original dev packages, I copied the patch to the module directory and used
patch < freelinking_prepopulate-1351932-3.patch

Terminal reported similar errors to the one in my previous post, so I reinstalled the modules, copied the patch to the prepopulate directory and applied the patch with the same command.

misc’s picture

You have to use the paramaters -p1 with patch (patch -p1 < file.patch), in the freelinking folder.

iolartes’s picture

@MISc Seems like that made the trick. Thank you very much for your help and patience

misc’s picture

No problem, we are here to help each other.

misc’s picture

Status: Active » Closed (fixed)