Giter VIP home page Giter VIP logo

Comments (8)

sebastiandedeyne avatar sebastiandedeyne commented on August 24, 2024

If you're still having issues here, please share a full stack trace of your error so I can debug it from there.

from laravel-pjax.

ngrcode avatar ngrcode commented on August 24, 2024

hi I have this error in pjax after installing crawler
The current node list is empty.
I dont know how to fix it

from laravel-pjax.

sebastiandedeyne avatar sebastiandedeyne commented on August 24, 2024

Please share the stack trace of the server error.

from laravel-pjax.

ngrcode avatar ngrcode commented on August 24, 2024

I have exactly the same error and my pjax version is 2.0.1
what can I do please help me

from laravel-pjax.

sebastiandedeyne avatar sebastiandedeyne commented on August 24, 2024

The original poster received a 500 status code from the server. I can't help without seeing a stack trace of that error.

from laravel-pjax.

ngrcode avatar ngrcode commented on August 24, 2024

this is my error InvalidArgumentException
The current node list is empty.

from laravel-pjax.

ngrcode avatar ngrcode commented on August 24, 2024

and this is my added middleware of jeffry

pjax() || $response->isRedirection()) { return $response; } $this->filterResponse($response, $request->header('X-PJAX-CONTAINER')) ->setUriHeader($response, $request); return $response; } /** * Prepare the PJAX-specific response content. * * @param Response $response * @param string $container * @return $this */ protected function filterResponse(Response $response, $container) { $crawler = new Crawler($response->getContent()); $response->setContent( $this->makeTitle($crawler) . $this->fetchContents($crawler, $container) ); return $this; } /** * Prepare an HTML title tag. * * @param Crawler $crawler * @return string */ protected function makeTitle($crawler) { $pageTitle = $crawler->filter('head > title')->html(); return "<title>{$pageTitle}</title>"; } /** * Fetch the PJAX-specific HTML from the response. * * @param Crawler $crawler * @param string $container * @return string */ protected function fetchContents($crawler, $container) { $content = $crawler->filter($container); if (! $content->count()) { abort(422); } return $content->html(); } /** * Set the PJAX-URL header to the current uri. * * @param Response $response * @param Request $request */ protected function setUriHeader(Response $response, Request $request) { $response->header( 'X-PJAX-URL', $request->getRequestUri() ); } }

from laravel-pjax.

ngrcode avatar ngrcode commented on August 24, 2024

please help me

from laravel-pjax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.