i habe one problem, i cant see the amp page in selected content.
i follow the next " instruccion" for config and no problem, but when i try acces to amp version for the next ur "localhost/c22112018/x/y/amp" />" i get the next error.

"The website encountered an unexpected error. Please try again later."

in "admin/reports/dblog" i get the netx error

TypeError: Argument 1 passed to Lullabot\AMP\Utility\AMPHTML5::parse() must be an instance of Masterminds\HTML5\Parser\InputStream, string given, called in /var/www/html/c22112018/vendor/masterminds/html5/src/HTML5.php on line 92 en Lullabot\AMP\Utility\AMPHTML5->parse() (línea 46 de /var/www/html/c22112018/vendor/lullabot/amp/src/Utility/AMPHTML5.php) #0 /var/www/html/c22112018/vendor/masterminds/html5/src/HTML5.php(92): Lullabot\AMP\Utility\AMPHTML5->parse('...', Array) #1 /var/www/html/c22112018/vendor/lullabot/amp/src/AMP.php(381): Masterminds\HTML5->loadHTML('...') #2 /var/www/html/c22112018/vendor/lullabot/amp/src/AMP.php(440): Lullabot\AMP\AMP->getDOMQuery('...', true) #3 /var/www/html/c22112018/modules/simple_amp/src/AmpBase.php(97): Lullabot\AMP\AMP->convertToAmpHtml() #4 /var/www/html/c22112018/modules/simple_amp/src/Controller/AmpController.php(36): Drupal\simple_amp\AmpBase->parse() #5 [internal function]: Drupal\simple_amp\Controller\AMPController->page(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\node\Entity\Node)) #6 /var/www/html/c22112018/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #7 /var/www/html/c22112018/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #8 /var/www/html/c22112018/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #9 /var/www/html/c22112018/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #10 /var/www/html/c22112018/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #11 /var/www/html/c22112018/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #12 /var/www/html/c22112018/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /var/www/html/c22112018/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /var/www/html/c22112018/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /var/www/html/c22112018/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/html/c22112018/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/www/html/c22112018/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/www/html/c22112018/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/www/html/c22112018/core/lib/Drupal/Core/DrupalKernel.php(669): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /var/www/html/c22112018/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #21 {main}.

any help? thanks.

Comments

Cangurin limpiezas created an issue. See original summary.

Anonymous’s picture

https://www.drupal.org/project/amp/issues/3016044 details a fix for the normal amp module.

Can be fixed if you use composer with the following in your composer.json

 "masterminds/html5": "^2.0 <2.4"

  • minnur committed 2256237 on 8.x-1.x
    Issue #3016425: error in amp version when try access
    
minnur’s picture

Status: Active » Fixed

Thanks for the fix.

minnur’s picture

Status: Fixed » Closed (fixed)

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