Hi,
I'm trying to setup this module on a site running on Acquia Cloud.
Installation runs OK.
On the settings page I enter the results from realfavicongenerator.net and upload a zip with generated favicons. Settings and favicons are saved OK.

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#c73608">
<meta name="theme-color" content="#ffffff">

In the markup of a page I can see only:

<meta name="theme-color" content="#ffffff">
<meta name="favicon-generator" content="Drupal responsive_favicons + realfavicongenerator.net">

Not the actual favicons. :(
If I try visit /admin/reports/status I got HTTP ERROR 500.

In recent logs I can see this error message:

Warning: implode(): Invalid arguments passed in responsive_favicons_requirements() (line 19 of /mnt/www/html/sitefolder/docroot/modules/contrib/responsive_favicons/responsive_favicons.install) #0 /mnt/www/html/sitefolder/docroot/core/includes/bootstrap.inc(548): _drupal_error_handler_real(2, 'implode(): Inva...', '/mnt/www/html/m...', 19, Array) #1 [internal function]: _drupal_error_handler(2, 'implode(): Inva...', '/mnt/www/html/m...', 19, Array) #2 /mnt/www/html/sitefolder/docroot/modules/contrib/responsive_favicons/responsive_favicons.install(19): implode('<br/>', NULL) #3 [internal function]: responsive_favicons_requirements('runtime') #4 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/Extension/ModuleHandler.php(402): call_user_func_array('responsive_favi...', Array) #5 /mnt/www/html/sitefolder/docroot/core/modules/system/src/SystemManager.php(112): Drupal\Core\Extension\ModuleHandler->invokeAll('requirements', Array) #6 /mnt/www/html/sitefolder/docroot/core/modules/system/src/Controller/SystemInfoController.php(49): Drupal\system\SystemManager->listRequirements() #7 [internal function]: Drupal\system\Controller\SystemInfoController->status() #8 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #9 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #10 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #11 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #12 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #13 /mnt/www/html/sitefolder/docroot/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Object(Closure), Array) #14 /mnt/www/html/sitefolder/docroot/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #15 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /mnt/www/html/sitefolder/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /mnt/www/html/sitefolder/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /mnt/www/html/sitefolder/docroot/modules/contrib/shield/src/ShieldMiddleware.php(75): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\shield\ShieldMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /mnt/www/html/sitefolder/docroot/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /mnt/www/html/sitefolder/docroot/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /mnt/www/html/sitefolder/docroot/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #25 {main}.

On local it works ok.

I haven't changed the .htaccess and settings.php as these changes are optional.

If you need some more information I will try to get them to you.

Thank you for your work and help. :)

Comments

Petr Illek created an issue. See original summary.

wiifm’s picture

Version: 8.x-1.0 » 8.x-1.x-dev

Nice find,

I just spun up a simplytest.me server, and visiting the status report yeilded

Fatal error: Call to undefined function url() in /home/rgv63/www/sites/default/modules/responsive_favicons/responsive_favicons.install on line 21

Which is less than ideal.

Will work on a patch.

Sean

  • wiifm committed 0fc242c on 8.x-1.x
    Issue #2855064: Remove some additional Drupal 7 functions from...
wiifm’s picture

Status: Active » Fixed

Just pushed a commit, hook_requirements() had some D7 functions in there, which was not great.

Just spun up a simpletest.me instance with 8.x-1.x branch of responsive_favicons, and it all seemed to work fine. Here is the resulting changes to the HTML code:

<link rel="apple-touch-icon" sizes="180x180" href="/sites/default/files/favicons/apple-touch-icon.png"/>
<link rel="icon" type="image/png" href="/sites/default/files/favicons/favicon-32x32.png" sizes="32x32"/>
<link rel="icon" type="image/png" href="/sites/default/files/favicons/favicon-16x16.png" sizes="16x16"/>
<link rel="manifest" href="/sites/default/files/favicons/manifest.json"/>
<meta name="theme-color" content="#ffffff"/>
<meta name="favicon-generator" content="Drupal responsive_favicons + realfavicongenerator.net" />

And the status report now works, with the message

Responsive favicons	     Found 5 favicons

Can you retest on 8.x-1.x ? If OK, I will cut a new release.

wiifm’s picture

Assigned: Unassigned » wiifm
Status: Fixed » Needs work

Hmmm,

This did not fix the issue, it appears that the icons are getting the file system's real path, which is clearly a bug.

<link rel="apple-touch-icon" sizes="180x180" href="/mnt/gfs/sitename/sites/g/files/ebysai141/files/favicons/apple-touch-icon.png"/>, <link rel="icon" type="image/png" href="/mnt/gfs/sitename/sites/g/files/ebysai141/files/favicons/favicon-32x32.png" sizes="32x32"/>, <link rel="icon" type="image/png" href="/mnt/gfs/sitename/sites/g/files/ebysai141/files/favicons/favicon-16x16.png" sizes="16x16"/>, <link rel="manifest" href="/mnt/gfs/sitename/sites/g/files/ebysai141/files/favicons/manifest.json"/>, <link rel="mask-icon" href="/mnt/gfs/sitename/sites/g/files/ebysai141/files/favicons/safari-pinned-tab.svg" color="#101579"/>

Re-opening the issue

wiifm’s picture

Title: Icons not showing in markup. » Take into account files directories that are symlinked outside the DRUPAL_ROOT

Re-titling issue for better SEO.

  • wiifm committed 6c3959f on 8.x-1.x
    Issue #2855064: Take into account files directories that are symlinked...
wiifm’s picture

Status: Needs work » Fixed

OK, try the new release 1.2.

petr illek’s picture

Hi Sean,
I've tested the 8.x-1.2 version and now the icons are appearing correctly on Acquia Cloud.

Thanks for quick reaction!

Petr

Status: Fixed » Closed (fixed)

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