Phpbb routing doesn't work - phpbb3

I am facing problem when routing in phpbb.
my routing.yml file looks like this:
test_hello_world_controller:
path: /id/{post_id}
defaults: { _controller: test.controller:doSomething }
requirements:
post_id: \d+
but it gives error:
No route found for "GET /id/43"

When there is this kind of problem :
You should have a look on your config/services.yml and check that dependance is well declared,
You should delete your cache folder everytime you update your routing.yml file.

Related

Vuepress - Netlify CMS - Error loading the CMS configuration

I'm make a Vuepress Blog and I would add to Netlify CMS in the backend.
The steps to implement Netlify CMS into Vuepress:
Create this path /blog/.vuepress/public/admin
Create a index.html into the path with this code:
In the same path create the config.yml:
backend:
name: github
branch: master
repo: githubusername/reponame
publish_mode: editorial_workflow
media_folder: ".vuepress/public/assets/img"
public_folder: "img"
collections:
name: "blog" # Used in routes, e.g., /admin/collections/blog
label: "Blog" # Used in the UI
folder: "blog/_posts"
Here official documentation.
Also the message is the same:
Error loading the CMS configuration<br>
Config Errors:<br>
config must have required property 'media_folder'<br>
config must have required property 'media_library'<br>
config must match a schema in anyOf<br>
config must have required property 'collections'<br>
Check your config.yml file.<br>
I'm not sure what is the problem because the file exist in /admin and the media_folder parameter is defined.
I'm read the Netlify CMS documentation and tutorials and I have linked the Github by Netlify connector.
Please Could you help me?
Thanks!
Have you indented the config.yml file properly? You could edit your question using a code block to we see clearly how your configuration is doing.
Note that publish_mode, media_folder and public_folder should not be indented.
Additionally, reading the documentation I think public_folder must begin with a slash.

Hosting Laravel in Cpanel doesn't run application

I have problem when I'm trying to access home routes on website, but it seems that it doesn't pass form index.php
dir of require and $app are work because when I dd(1); after it, it show result in website
require __DIR__.'/system/vendor/autoload.php';
$app = require_once __DIR__.'/system/bootstrap/app.php';
dd(1);
but , the problem when handling the incoming request in kernel , which means run application in same file (index.php)
the error after sending response
The GET method is not supported for this route. Supported methods: HEAD.
You should not mess with those files. Seems that you havent defined the document root from the application.
Make sure that the document root is set to the folder public/ inside the project folder.
Found solution ,
I should use base URL as "/" not "/FolderProject"
pathInfo: "/"
requestUri: "/"
baseUrl: ""
basePath: ""

Storage::download working wrong in laravel 5.7

I have a file in path:
app/public/template/templateeSkillsMatrix_Config.docx
and when i use:
return response()->download(storage_path('app/public/template/eSkillsMatrix_Config.docx'));
It is working, but when i use :
return Storage::download(storage_path('app/public/template/eSkillsMatrix_Config.docx'));
It show an error:
File not found at path: E:/project/agl/nav/New folder/DKMH/storage/app/public/template/eSkillsMatrix_Config.docx
I dont know why.
I read laravel docs , but i dont understand what is parameter of it.
Please help!
Just like #apokryfos's comment ,Storage::download(..) will automatically use the base storage path so i dont need call storage_path method. I need to call it the following:
return Storage::download('public\template\eSkillsMatrix_Config.docx');
in this line, i removed storage_path method and delete app/ in path.
and it is working for me!

Ignore Asp.Net Core MVC route with webpack HMR

I have webpack & asp.net mvc core working fine.
I only have one bundle configured.
There is only one problem with HMR.
The web pack dev server is running at this address:
http://127.0.0.1:64579/dist/__webpack_hmr
With my brother if I go to this address and use the default route:
http://127.0.0.1:64579/
Everything works fine.
If I go to a specific route: http://127.0.0.1:64579/home/index
Chrome tries to open the dev server at this address: http://127.0.0.1:64579/home/dist/__webpack_hmr
Is there a way to configure the dev server in webpack.config.js to ignore the mvc route parameters and use only the base address?
I found it... I hate me :)
output: {
path: path.resolve(__dirname, 'wwwroot/dist/'),
filename: "[name].js",
publicPath: 'dist/'
},
And the fixed version, I was the leading slash in the publicPath property.
output: {
path: path.resolve(__dirname, 'wwwroot/dist/'),
filename: "[name].js",
publicPath: '/dist/'
},

Webpack mix, Vue - output files on cdn subdomain

I am struggling with webpack. I want to have the compiled files in public-cdn folder. However, the following code creates files in several different locations. Including E:\cdn. Chunks, app.js, css files - everything in different location.
Paths:
main folder: www/Project
laravel public: www/Project/public
cdn folder: www/Project/public-cdn
webpack.mix.js
mix.webpackConfig({
output : {
path : '/public-cdn/',
publicPath : 'http://cdn.ywg.localhost/',
chunkFilename : 'js/[name].js'
},
});
mix.sass('resources/assets/sass/styles.scss', '../public-cdn/css')
.options({processCssUrls: false
});
mix.sass('resources/assets/sass/invoice.scss', '../public-cdn/css')
.options({processCssUrls: false
});
mix.js('resources/assets/js/frontApps.js', '../public-cdn/js')
.extract(['vue']);
I tried experimenting with Path and PublicPath parameters. PublicPath doesn't seem to work at all.
After some more experimenting, I think I found a solution. The issue might be caused by laravel mix which set's the "public" folder.
I added:
mix.setPublicPath('public-cdn/');
and it seems to be working well now.

Resources