Laravel 5.5 cant find the page - laravel

recently i'm facing strange issue with my app which wasn't exist at least until yesterday!
If I try to open certain urls such as myapp.dev/blog or myapp.dev/categories etc. I get error of
Sorry, the page you are looking for could not be found.
but if I change my url to something like myapp.dev/t/blog it will load the page!
any idea?
Update
Route::get('/categories', 'frontend\FrontendController#totalcategories')->name('allcategories')->where('slug', '[\w\d\-\_]+');

try to move your at end of file or start of file in web.php. In my case sometime it's behave if while your url getting conflict with each other.
in my case my was like routes this
Route::get('{status}/category','TempController#index');
Route::get('category/t','TempController#store');
Simply I just moved myfirst line at end of file. and worked fine.
This happend because Laravel treat first Segment of URL as argument.

Related

CanJS can.route.ready() version 2.1- '#!' is changed to '#!&' on clicking the link

I have an application which relies on can.route to capture the #change when the user clicks on a link.
href for the link is having pattern '#!'.
Once the change is capture by the can route utility, i am seeing the hash in the browser changing to #!&.
This is causing an additional entry in browser history stack.
Has anyone faced a similar issue?
Appreciate your help.
Could not provide a fix as there is no code to see how the route is configured.
Looks like you are adding only additional parameters to the route. To confirm, pls execute can.route.attr(); in your developer console of the browser.
If everything is configured properly, you should get something like this for the url http://localhost/example#!currentRoutePage
---> can.route.attr();
Object {route: "currentRoutePage"}
Looks in your case, url is http://localhost/example#!&view=currentRoutePage and so route is null in the object
---> can.route.attr();
Object {view: "currentRoutePage", route: ""}
If this doesn't help much, please share the url you are seeing in the browser and the route configuration for the same.

Renaming my Laravel 4 root directory makes it doesn't work. What's wrong?

I got Laravel 4 zip file from gitHub. ("laravel-master").
run composer and get all the dependencies.
i can access it from: "127.0.0.1/laravel-master/public"
but when i rename the "laravel-master" to other names, and then try to access it, i get:
"HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request."
I can not figure out what's going wrong !
You need to set your vhost docroot to /public most likely. You shouldn't be able to access it at /public since that should be the root.
Because you specifically mentioned MAMP (in the comments to an answer below), try going to Preferences on the MAMP app page, and click "--" in the cache dropdown of the PHP tab.
A simple refresh after that cleared up this same issue for me.
see Apathetic012's comment on a similar issue on Github (https://github.com/laravel/framework/issues/625)
EDIT: specifying where MAMP was mentioned.

Failsave cant start jetty server because of missing http://jetty.mortbay.org/configure.dtd

i cant verify my webapp using maven-failsave because the web-jetty.xml referenced a missing dtd (http://jetty.mortbay.org/configure.dtd).
Any ideas? Can i disable the dtd-check?
Where can i get the content of http://jetty.mortbay.org/configure.dtd?
old one should work, I'll look into that, but you can also get it at:
http://www.eclipse.org/jetty/configure.dtd
[edit] An update on this:
We have a number of redirects in place as we try and keep the really old xml file doctypes valid. We recently wired up a redirect from jetty.codehaus.org to www.eclipse.org/jetty which has resulted in a number of validation errors on these old urls. This is being addressed but if it impacts you updating to www.eclipse.org/jetty/configure.dtd is the best solution so the redirect game is no longer played.

Magento - blank lines being added to wsdl file

I am trying to call the API but I keep getting a soap error that can't load the file. I found that the reason is there are about 3 blank lines at the top of the XML file that is returned. I found this by doing wget url.
This use to work just fine, when I debug through the API controller the response or xml looks fine all the way through, I don't see any spaces at all. I have no idea what might be causing this. I don't think there is anything we modified that would do this.
UPDATE:: I have found that it appears to be because of an observer class I made for the controller_action_predispatch event. It appears I have some spaces above the
I'm not completely sure of what I am talking about as far as I've never used the API, but you should try to look at the end of the file which generates your XML for a closing '?>'. If there is this closing PHP marker, remove it and try again you API call...
In Magento, PHP file should never be ended by a closing php marker '?>'.
edit: as said in comments, also look at spaces before the opening tag '<?php'.
First thing need to check is api.php file in root folder, most of api blank space issues will come if any empty lines added in api.php file before starting

CodeIgniter Routing / Htaccess / URI issues

I recently joined a team of devs and I'm trying to get an SVN checked out onto my local machine. Unfortunately, I've run into some issues with links and routing. My local machine is using a WAMP setup.
Let's say I have in my controller:
function testfunc()($this->load->view('testfunc');
and in my testview view I have
<li>what we do</li>
At first, I was getting a URL disallowed characters issue. Thumbing through some threads, I added in rawencode($str) and some other things.
Now I get a 404 Page Found error, when the files are clearly there. It appears as though my controller isn't being called, and in turn the view is not called
Any suggestions?
Thanks.
You are missing the controller. Unless you are using some sort of routing, you should be using something like:
<li>what we do</li>
OR
<li><?php echo anchor('controller/testfunc', what do we do);?></li>

Resources