i tried to install drupal 8 theme on localhost and shared host

mostafax222
32 Posts
mostafax222 posted this 29 July 2017

this error show when edit drupal theme on ubuntu system and webhost : OS: Linux mostafa-K52F 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 E_NOTICE: Undefined index: #id /opt/lampp/htdocs/almokatar/themes/untitled/theme-methods.php 82 Callstack: -> untitled_preprocess_block(array(19) { ... }, 'block', array(6) { ... }) -> Drupal\Core\Theme\ThemeManager::render('block', array(19) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(12) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(8) { ... }, false) -> Drupal\Core\Render\Renderer::render(array(8) { ... }) -> Drupal\Core\Template\TwigExtension::escapeFilter(Drupal\Core\Template\TwigEnvironment(...) { ... }, array(8) { ... }, 'html', NULL, true) -> __TwigTemplate_a7229add69aebb728b00d5016b8972b206b6df4dadd1be810aa7833c3a477534::doDisplay(array(19) { ... }, array(0) { ... }) -> Twig_Template::displayWithErrorHandling(array(19) { ... }, array(0) { ... }) -> Twig_Template::display(array(19) { ... }) -> Twig_Template::render(array(19) { ... }) -> twig_render_template('profiles/v...', array(19) { ... }) -> Drupal\Core\Theme\ThemeManager::render('bs_1col', array(19) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(13) { ... }, false) -> Drupal\Core\Render\Renderer::render(array(13) { ... }, false) -> Drupal\Core\Render\MainContent\HtmlRenderer::Drupal\Core\Render\MainContent{closure}() -> Drupal\Core\Render\Renderer::executeInRenderContext(Drupal\Core\Render\RenderContext(...) { ... }, Closure(...) { ... }) -> Drupal\Core\Render\MainContent\HtmlRenderer::prepare(array(13) { ... }, Symfony\Component\HttpFoundation\Request(...) { ... }, Drupal\Core\Routing\CurrentRouteMatch(...) { ... }) -> Drupal\Core\Render\MainContent\HtmlRenderer::renderResponse(array(11) { ... }, Symfony\Component\HttpFoundation\Request(...) { ... }, Drupal\Core\Routing\CurrentRouteMatch(...) { ... }) -> Drupal\Core\EventSubscriber\MainContentViewSubscriber::onViewRenderArray(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent(...) { ... }, 'kernel.vie...', Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher(...) { ... }) -> Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch('kernel.vie...', Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent(...) { ... }) -> Symfony\Component\HttpKernel\HttpKernel::handleRaw(Symfony\Component\HttpFoundation\Request(...) { ... }, 1) -> Symfony\Component\HttpKernel\HttpKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\Session::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\KernelPreHandle::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\page_cache\StackMiddleware\PageCache::pass(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\page_cache\StackMiddleware\PageCache::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\ReverseProxyMiddleware::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\NegotiationMiddleware::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Stack\StackedHttpKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\DrupalKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... })

i set permission 777 for all files and not working. plz make video how to set permission to drupal 8 theme.thanks

this error show when edit drupal theme on ubuntu system and webhost : OS: Linux mostafa-K52F 4.10.0-28-generic #32-Ubuntu SMP Fri Jun 30 05:32:18 UTC 2017 x86_64 E_NOTICE: Undefined index: #id /opt/lampp/htdocs/almokatar/themes/untitled/theme-methods.php 82 Callstack: -> untitled_preprocess_block(array(19) { ... }, 'block', array(6) { ... }) -> Drupal\Core\Theme\ThemeManager::render('block', array(19) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(12) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(8) { ... }, false) -> Drupal\Core\Render\Renderer::render(array(8) { ... }) -> Drupal\Core\Template\TwigExtension::escapeFilter(Drupal\Core\Template\TwigEnvironment(...) { ... }, array(8) { ... }, 'html', NULL, true) -> __TwigTemplate_a7229add69aebb728b00d5016b8972b206b6df4dadd1be810aa7833c3a477534::doDisplay(array(19) { ... }, array(0) { ... }) -> Twig_Template::displayWithErrorHandling(array(19) { ... }, array(0) { ... }) -> Twig_Template::display(array(19) { ... }) -> Twig_Template::render(array(19) { ... }) -> twig_render_template('profiles/v...', array(19) { ... }) -> Drupal\Core\Theme\ThemeManager::render('bs_1col', array(19) { ... }) -> Drupal\Core\Render\Renderer::doRender(array(13) { ... }, false) -> Drupal\Core\Render\Renderer::render(array(13) { ... }, false) -> Drupal\Core\Render\MainContent\HtmlRenderer::Drupal\Core\Render\MainContent\{closure}() -> Drupal\Core\Render\Renderer::executeInRenderContext(Drupal\Core\Render\RenderContext(...) { ... }, Closure(...) { ... }) -> Drupal\Core\Render\MainContent\HtmlRenderer::prepare(array(13) { ... }, Symfony\Component\HttpFoundation\Request(...) { ... }, Drupal\Core\Routing\CurrentRouteMatch(...) { ... }) -> Drupal\Core\Render\MainContent\HtmlRenderer::renderResponse(array(11) { ... }, Symfony\Component\HttpFoundation\Request(...) { ... }, Drupal\Core\Routing\CurrentRouteMatch(...) { ... }) -> Drupal\Core\EventSubscriber\MainContentViewSubscriber::onViewRenderArray(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent(...) { ... }, 'kernel.vie...', Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher(...) { ... }) -> Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher::dispatch('kernel.vie...', Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent(...) { ... }) -> Symfony\Component\HttpKernel\HttpKernel::handleRaw(Symfony\Component\HttpFoundation\Request(...) { ... }, 1) -> Symfony\Component\HttpKernel\HttpKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\Session::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\KernelPreHandle::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\page_cache\StackMiddleware\PageCache::pass(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\page_cache\StackMiddleware\PageCache::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\ReverseProxyMiddleware::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\StackMiddleware\NegotiationMiddleware::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Stack\StackedHttpKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... }, 1, true) -> Drupal\Core\DrupalKernel::handle(Symfony\Component\HttpFoundation\Request(...) { ... }) i set permission 777 for all files and not working. plz make video how to set permission to drupal 8 theme.thanks
Vote to pay developers attention to this features or issue.
7 Comments
Order By: Standard | Newest
mostafax222
32 Posts
mostafax222 posted this 29 July 2017

error

error
Support Team
Support Team posted this 30 July 2017

Hi,

Please remove the installed theme and theme module, clear Drupal cache and install the attached theme.
If the issue continues please check php limits: upload_max_size and memory_limit. If they are small please increase these limits.

Please keep us posted bout the progress.

Thank you,
Olivia

Hi, Please remove the installed theme and theme module, clear Drupal cache and install the attached theme. If the issue continues please check php limits: upload_max_size and memory_limit. If they are small please increase these limits. Please keep us posted bout the progress. Thank you, Olivia
mostafax222
32 Posts
mostafax222 posted this 30 July 2017

i installed it and have same error.

i installed it and have same error.
mostafax222
32 Posts
mostafax222 posted this 30 July 2017

error

error
Support Team
Support Team posted this 31 July 2017

Hi,

Please try the following solution:

  1. open theme-methods.php file and backup it.
  2. find the following code:
    $block_id = $variables['elements']['#id'];
    $block = \Drupal\block\Entity\Block::load($block_id);
  3. and change it to:
    $block_id = !empty($variables['elements']['#id']) ? $variables['elements']['#id'] : '';
    $block = \Drupal\block\Entity\Block::load($block_id);
    if (!isset($block))
    return;
  4. save the file.

Does the issue continue?

Thank you,
Olivia

Hi, Please try the following solution: 1. open theme-methods.php file and backup it. 2. find the following code: `$block_id = $variables['elements']['#id']; $block = \Drupal\block\Entity\Block::load($block_id);` 3. and change it to: `$block_id = !empty($variables['elements']['#id']) ? $variables['elements']['#id'] : ''; $block = \Drupal\block\Entity\Block::load($block_id); if (!isset($block)) return;` 4. save the file. Does the issue continue? Thank you, Olivia
mostafax222
32 Posts
mostafax222 posted this 04 August 2017

have error

have error
Support Team
Support Team posted this 08 August 2017

Hi,

Did you try the provided solution? Could you please also clear Drupal cache (under Drupal configuration)
If it does not work please attach the theme with all modifications.

hank you,
Olivia

Hi, Did you try the provided solution? Could you please also clear Drupal cache (under Drupal configuration) If it does not work please attach the theme with all modifications. hank you, Olivia
You must log in or register to leave comments