Hello! Have a bug in File field paths. When was created node with configured file field paths "file field", I received 3 warnings.

Warning: Invalid argument supplied for foreach() in element_children() (line 6540 of /includes/common.inc)
Warning: Invalid argument supplied for foreach() in element_children() (line 6540 of /includes/common.inc)
Warning: Invalid argument supplied for foreach() in element_children() (line 6540 of /includes/common.inc)

Disable token - warnings here
Disable transliteration - here
Disable FFPaths - warnings gone

Configs - in node was fields - TermField TAGS and termField PROJECTS. Pattern for file path was "folder/[tags]/[projects]"
in created node file path was - site.com/folder/tag1_tag2_tag3_tag4/project1
node was successfully created/ But 3 warnings always in head of site!

What can I do with this?

Comments

pringlz created an issue. See original summary.

pringlz’s picture

Issue summary: View changes
Deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

Hi @pringlz,

Can you provide some more information? The error is far to generic to be of any use to me.

If the information you've provided me is to be taken literally though, then it's safe to say that the pattern you've provided is wrong as that is in no way using valid tokens, but then if you have the Token module enabled (which isn't a requirement but 99% of people do have it) then you wouldn't be able to set that value in the first place.

Can you provide me with steps on setting up a fresh site so that I can reproduce that issue? Ideally using http://simplytest.me so that I can setup an identical environment?

Thanks in advance.

pringlz’s picture

Status: Postponed (maintainer needs more info) » Active

Thank you for your answer! Sorry for my english)
Problem was happened, when I created material with configured paths by token module - all info is right. But this 3 warnings do not hided and stay here all time, until I disable FFPaths. When I delete matelrial, terms, unninstall and manually delete token, transliteration, FFPaths, and after that install other version 7 dev FFPaths, 3 warnings again here! I didnt configure anything, it is no new material added, only enable another version of FFPaths after big cleaning of database, and warnings are here...
Sorry, maybe this is stupid problem, but what had happened - I can not do this.

I will try create similar situation in simplytest, but not sure, that troubles will happened in simplytest))

In that time, when I saved preconfigured new material, there was 4 new terms in it, which had to created in one time with material, and give new (not yet created) path for uploaded (in temporary) files. Maybe when they created - some going wrong, but in this case may be now 4 warnings... not 3.

Deciphered’s picture

Problem was happened, when I created material with configured paths by token module - all info is right.

"folder/[tags]/[projects]" isn't valid, the tokens should be something like: "folder/[node:field_tags]/[node:field_projects]" or similar.If they are working, it's possible that the issue is the code that is defining those non-standard tokens.

Again, if you can give me a way to reproduce the issue I would be more than happy to attempt. Something like:

  1. Go to http://simplytest.me
  2. Install modules (provide a list of required modules and version)
  3. Create content type with settings (Provide settings)
  4. Create a field with settings (Provide settings)
  5. Create node with content (provide content)

Without this information I can't be of much help.

coozila’s picture

subscribe

Deciphered’s picture

@coozila, are you experiencing this issue? If so, can you provide steps (see above on how to provide steps) to reproduce the issue?

If not, I'll have to close this issue as it's been over a month and I haven't been provided steps to reproduce the issue. Can't fix something unless I can reproduce the issue.

Deciphered’s picture

Status: Active » Postponed (maintainer needs more info)

Marking this issue as postponed, can't fix an issue unless I'm told to to reproduce the issue.

oadaeh’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing due to the lack of a response from the OP in over 2 years.