Drupal 7.23
Webform 7.x-4.0-beta1
webform_optionsmarkup-7.x-2.0-alpha1

Installation and enabling of the module resulted in the following error due to pathing and naming issues:

Dropped webform_optionsmarkup folder into /sites/all/modules
Enabled at /admin/modules and received warning errors:

Warning: include_once([path]/staging/sites/all/modules/webform/components/webform_display_optionsmarkup.inc): failed to open stream: No such file or directory in _theme_process_registry() (line 565 of [path]/staging/includes/theme.inc).
Warning: include_once(): Failed opening '[path]/staging/sites/all/modules/webform/components/webform_display_optionsmarkup.inc' for inclusion (include_path='.:') in _theme_process_registry() (line 565 of [path]/staging/includes/theme.inc).

The patch below correctly fixes this bug, I have reviewed and checked this. Please let me know if there are any problems.

-Samson Tse

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TimeBandit’s picture

Issue summary: View changes
shawn_smiley’s picture

It sounds like you installed the module correctly. I wonder if there has been another API change in the Webform 4.x module. I'll have to take a look and get back to you on this one.

mr.alinaki’s picture

Have the same issue

charlie-s’s picture

I get this anytime I build a custom webform component. It's happened for probably 12 months now. Basically, when the caches clear and Webform tried to load all component includes, it looks inside of its own components folder instead of the contrib module's component folder.

I'll spend some time on this now and see if I can resolve.

charlie-s’s picture

Status: Active » Needs review
FileSize
1.1 KB

That wasn't so bad. The _webform_theme_optionsmarkup() function in components/webform_optionsmarkup.inc had 2 issues:

  1. The filename is webform_display_optionsmarkup.inc not webform_display_optionsmarkup.inc.
  2. The `path` should be set to the current module so that when Webform invokes this function during registry rebuilds, Drupal doesn't think this component's file exists within the Webform module's directory.

Patch provided.

nevergone’s picture

FileSize
575 bytes

Corrected patch.

shawn_smiley’s picture

Thanks @csdco and @nevergone, I'll try to review the patch and get it committed in the next few days.

SamsonTse’s picture

Assigned: Unassigned » SamsonTse
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

The patch below correctly fixes this bug, I have reviewed and checked this. Please let me know if there are any problems.

diff --git a/components/webform_optionsmarkup.inc b/components/webform_optionsmarkup.inc
index 09188f2..1868352 100644
--- a/components/webform_optionsmarkup.inc
+++ b/components/webform_optionsmarkup.inc
@@ -40,7 +40,8 @@ function _webform_theme_optionsmarkup() {
return array(
'webform_display_optionsmarkup' => array(
'render element' => 'element',
- 'file' => 'components/webform_display_optionsmarkup.inc',
+ 'file' => 'components/webform_optionsmarkup.inc',
+ 'path' => drupal_get_path('module', 'webform_optionsmarkup'),
),
);
}

-Samson Tse

gge’s picture

#8 works with Webform 7.x-4.0-rc3. No more warnings.

Thanks.

anou’s picture

Confirmed. #8 does the job pretty well. Thanks. (Webform Options Markup 7.x-2.0-alpha1 + Webform 7.x-4.4)

archimedes’s picture

Did this ever get committed?

shawn_smiley’s picture

Status: Reviewed & tested by the community » Fixed

Committed 827f4a10c5761cdb697e944b3b0d5910dba4d27c

  • shawn_smiley committed 827f4a1 on 7.x-2.x
    Issue #2156321 by nevergone, charlie-s: Fixed error messages when...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.