I´m Doing a fresh install and get this error when the kickstart finishes. What could be wrong?

Warning: file_get_contents(//www.googletagservices.com/tag/js/gpt.js): failed to open stream: No such file or directory in _locale_parse_js_file() (line 1488 of /var/www/vhosts/...../test2/includes/locale.inc).

Processed 6 (6 created, 0 updated, 0 failed, 0 ignored) in 23.2 sec (16/min) - done with 'CommerceKickstartBagsCases'
Processed 4 (4 created, 0 updated, 0 failed, 0 ignored) in 3.7 sec (65/min) - done with 'CommerceKickstartCollection'
Processed 4 (4 created, 0 updated, 0 failed, 0 ignored) in 4.4 sec (55/min) - done with 'CommerceKickstartDrinks'
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 3.8 sec (32/min) - done with 'CommerceKickstartHats'
Processed 10 (10 created, 0 updated, 0 failed, 0 ignored) in 3.9 sec (153/min) - done with 'CommerceKickstartPages'
Processed 15 (15 created, 0 updated, 0 failed, 0 ignored) in 4.8 sec (188/min) - done with 'CommerceKickstartShoes'
Processed 3 (3 created, 0 updated, 0 failed, 0 ignored) in 4 sec (45/min) - done with 'CommerceKickstartStorage'
Processed 54 (54 created, 0 updated, 0 failed, 0 ignored) in 7.5 sec (429/min) - done with 'CommerceKickstartTops'
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 3.8 sec (31/min) - done with 'CommerceKickstartAdPush'
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 3.4 sec (35/min) - done with 'CommerceKickstartBlogPost'
Processed 4 (4 created, 0 updated, 0 failed, 0 ignored) in 24.7 sec (10/min) - done with 'commercekickstartnodebags_cases'
Processed 3 (3 created, 0 updated, 0 failed, 0 ignored) in 13.5 sec (13/min) - done with 'commercekickstartnodedrinks'
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 10.5 sec (11/min) - done with 'commercekickstartnodehats'
Processed 2 (2 created, 0 updated, 0 failed, 0 ignored) in 11.4 sec (11/min) - done with 'commercekickstartnodeshoes'
Processed 1 (1 created, 0 updated, 0 failed, 0 ignored) in 4.9 sec (12/min) - done with 'commercekickstartnodestorage_devices'
Processed 8 (8 created, 0 updated, 0 failed, 0 ignored) in 30.5 sec (16/min) - done with 'commercekickstartnodetops'
Processed 3 (3 created, 0 updated, 0 failed, 0 ignored) in 2.6 sec (69/min) - done with 'CommerceKickstartSlideshow'

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

preston3271’s picture

I install this before, but this time I said allow translation of the site. This was the only difference.

tomtabs’s picture

Same here, I clicked allow translation.

horaceho’s picture

horaceho’s picture

It seems there are two typos ("http:" prefix missing). To fix, modify the following files before installation:

    $ git diff
    diff --git a/profiles/commerce_kickstart/commerce_kickstart.install b/profiles/commerce_kickstart/commerce_kickstart.ins
    index 51e8a0b..7a71990 100644
    --- a/profiles/commerce_kickstart/commerce_kickstart.install
    +++ b/profiles/commerce_kickstart/commerce_kickstart.install
    @@ -79,7 +79,7 @@ function commerce_kickstart_install_tasks_alter(&$tasks, $install_state) {
         $tasks[$install_state['active_task']]['dfp_settings'] += array(
           'dfp_unit' => 'Kickstart_Install',
         );
    -    drupal_add_js('//www.googletagservices.com/tag/js/gpt.js');
    +    drupal_add_js('http://www.googletagservices.com/tag/js/gpt.js');
         drupal_add_js(array(
           'dfp' => $tasks[$install_state['active_task']]['dfp_settings'],
         ), 'setting');
    diff --git a/profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
    index 24c3268..bd1e279 100644
    --- a/profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
    +++ b/profiles/commerce_kickstart/modules/commerce_kickstart/commerce_kickstart_dfp/commerce_kickstart_dfp.module
    @@ -23,7 +23,7 @@ function commerce_kickstart_dfp_page_build(&$page) {
             'dfp_width' => 468,
           );
           drupal_add_css(drupal_get_path('module', 'commerce_kickstart_dfp') . '/theme/commerce_kickstart_dfp.css');
    -      drupal_add_js('//www.googletagservices.com/tag/js/gpt.js');
    +      drupal_add_js('http://www.googletagservices.com/tag/js/gpt.js');
           drupal_add_js(array(
             'dfp' => $dfp_settings[$current_path],
           ), 'setting');
jsacksick’s picture

Priority: Critical » Normal

That's not a typo using "//" means the request will be either performed in http or https... This issues isn't critical it's just a warning...
Do you have the allow_url_fopen value set to 1 in your php.ini configuration ?

horaceho’s picture

allow_url_fopen is On. For my case, there is no more waning, after "http:" is added.

jsacksick’s picture

Status: Active » Fixed
FileSize
1.66 KB

For some reasons this works for me locally, I merged a patch to dev that checks if the server is running in http or https and adds the prefix accordingly. Attached patch should fix the issue.

jsacksick’s picture

Attached the wrong patch sorry, here's the correct one.

jsacksick’s picture

.... Sorry again, right one this time !

EMHmark7’s picture

Hi,

Anybody can tell me how to use this bugfix batch?
Thanks.

jsacksick’s picture

Hi, here are two drupal.org pages that might help you : http://drupal.org/patch/apply or http://drupal.org/node/620014

rszrama’s picture

I just tested this and it worked by copying the patch file to my site's profiles/commerce_kickstart directory and then using "patch -p1 < [file name]".

Wayne Riesterer’s picture

This worked for me too :)

I got a Windows-friendly 'patch' utility from here: http://gnuwin32.sourceforge.net/packages/patch.htm and then added the patch.exe file to my path.

After I patched my installation, a page refresh got rid of the error that shows up on the Home page as well.

Thanks

Status: Fixed » Closed (fixed)

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

monsoon’s picture

@Wayne Riesterer:

Can you please elaborate the process in clear steps how to run commands using this utility to patch a file. I am have kickstart install error discuss here. Learning to patch using this utility will help to use it on all other patches I wan to apply. Also Please explain how to reverse the process if things go wrong after patch application.
Thanks,

monsoon’s picture

#9 failed to apply using Git.
I managed to find instructions and run the commands. Any other solution to this problem out there??

Please help.
Thanks

rcharamella’s picture

Status: Closed (fixed) » Active

Is there a fix for this post install?

rszrama’s picture

Status: Active » Closed (fixed)

Apply the last patch above or update to Commerce Kickstart 7.x-2.7 tomorrow.

ayalas’s picture

Another approach is to disable commerce_kickstart_dfp and stop your site from accessing Google.

srikanth.g’s picture

I am getting the same error in my XAMPP,how to fix?
Error message
Warning: file_get_contents(http://www.googletagservices.com/tag/js/gpt.js) [function.file-get-contents]: failed to open stream: No connection could be made because the target machine actively refused it. in _locale_parse_js_file() (line 1488 of D:\xampp\htdocs\commerce_kickstart\includes\locale.inc).

candelas’s picture

I just got this in a new Commerce Kickstart installation. Was this patch ever ported or just closed automatically?

The error:

    Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in _locale_parse_js_file() (line 1488 of /var/www/commerce_kickstart/includes/locale.inc).
    Warning: file_get_contents(http://www.googletagservices.com/tag/js/gpt.js): failed to open stream: no suitable wrapper could be found in _locale_parse_js_file() (line 1488 of /var/www/commerce_kickstart/includes/locale.inc).