GithubHelp home page GithubHelp logo

Double // about moc.notfound HOT 8 CLOSED

mocdk avatar mocdk commented on June 15, 2024
Double //

from moc.notfound.

Comments (8)

OwlAsh avatar OwlAsh commented on June 15, 2024

my fault, im sorry.
I forgot to set the default domain.

from moc.notfound.

mrimann avatar mrimann commented on June 15, 2024

I just ran into the exact same error.

@OwlAsh Could you explain how you solved the issue?

from moc.notfound.

OwlAsh avatar OwlAsh commented on June 15, 2024

@mrimann Please try to add the default domain.
Backend > Sites Manager > Edit ur created site > Add Domain

That should solve ur problem.

from moc.notfound.

mrimann avatar mrimann commented on June 15, 2024

Well, I did that (added "foobar.dev") already - yet the problem stays there and I see the following exception being logged:
Uri with path "http://foobar.dev//404" could not be found.

from moc.notfound.

OwlAsh avatar OwlAsh commented on June 15, 2024

@mrimann That was my error - so ...
May u clear the cache again? I dont trust them ... ;D

from moc.notfound.

mrimann avatar mrimann commented on June 15, 2024

Force-Flushed the cache but didn't help. Checked via GUI and CLI that the Domain is available and mapped to that Site - everything OK.

In the end, I could hardcode-hack it by modifying the View-Helper (line 62) as following:

Original:
$httpRequest = Request::create(new Uri($parentHttpRequest->getBaseUri() . '/' . $path));

Current (working):
$httpRequest = Request::create(new Uri($parentHttpRequest->getBaseUri() . $path . '.html'));

So what solved it for now was to remove the "/" that is added in between, and instead added a ".html" at the end. I'm not sure why this was needed at all...

@aertmann Maybe you know what could have gone wrong...?

from moc.notfound.

aertmann avatar aertmann commented on June 15, 2024

@mrimann good question.. I always remove the ".html" suffix in all my projects, so that might be the reason? Could you check if you do that it works?

from moc.notfound.

mrimann avatar mrimann commented on June 15, 2024

@aertmann yeah, I think this was the point: And it seems to be solvable in two ways:

  • remove the defaultUriSuffix from the global route definition (then the package works out of the box)
  • keep the defaultUriSuffix in the global config, but modify the config of your package to use path: '404.html' (with the .html-suffix)

I've now gone the first of those two paths. Thanks for the hint!

from moc.notfound.

Related Issues (8)

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.