I've setup webforms and webfrom_localization, I've got the string translation working on the form's page itself. However I was trying to use it as a block. The pages on which the block was loaded in a different language (de instead of en) would show the following error:

Notice: Undefined property: stdClass::$content in webform_block_view() (Zeile 2032 von /sites/all/modules/contrib/webform/webform.module).

I'm guessing the fact that it's trying to load the block of an alternate version of the form might be causing issues. I had the 'allow block' option enabled on the main form but not it's translation (enabling it did not fix the problem anyways).

I currently changed my approach and I am including the webform as a rendered entity in a view instead to bypass the problem but I still wanted to report it as a possible bug. Let me know if you need additional information.

Comments

Nodz’s picture

Issue summary: View changes

Cleaned up paths

joseph.olstad’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

if this issue occurs again then please re-open this issue, it is advised to please re-test on a recent version of webform and webform_localization and provide steps to reproduce the issue.

NYAWD’s picture

Version: 7.x-4.x-dev » 7.x-4.2
Status: Closed (cannot reproduce) » Active

I think I am encountering the same bug.
The webform is used as a block on a basic page and while the basic page and the block on it load fine in the original language (german), there is no block only the basic page displayed for the english page. No error message.
On the page of the form itself I can choose between "German" and "English" so the translation is definitely working, but there is no translated block showing up on the basic page in english.
I am using Drupal 7.41 with Webform Localization 7.x-4.2 and the translated version of the basic page is achieved with i18n.

edgarsg’s picture

I have exactly the same problem.

joseph.olstad’s picture

I recommend the workaround mentioned by the author of this issue. Use a view. Feel free to submit a patch for review, the webform in a block needs its' node info, a view will do this.

Feel free to add block functionality in a patch for review, otherwise use a view as mentioned previously.

joseph.olstad’s picture

Category: Bug report » Feature request
eloivaque’s picture

I Created a patch about this problem. The patch needs to apply to webform module, not on webform_localitzation.

joseph.olstad’s picture

Project: Webform Localization » Webform
Status: Active » Needs review

Moving this issue over to the webform queue, there is a patch for the webform module available.

Status: Needs review » Needs work
joseph.olstad’s picture

looks like this patch needs a reroll.

rohit.rawat619’s picture

Assigned: Unassigned » rohit.rawat619
Status: Needs work » Active
rohit.rawat619’s picture

Assigned: rohit.rawat619 » Unassigned
Status: Active » Needs review
StatusFileSize
new103.1 KB
liam morland’s picture

Version: 7.x-4.2 » 7.x-4.x-dev
Status: Needs review » Needs work
joseph.olstad’s picture

I went ahead and rerolled patch 6, see new patch (cleaned up)

patch 11 doesn't appear to be for this branch nor does it appear to be appropriate for the described issue.

note: I haven't tested this patch.

joseph.olstad’s picture

Status: Needs work » Needs review
liam morland’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.