Urgent: New routing issue in 7.7.5

Wappler: 7.7.5
OS: MacOS Silicon
Server: PHP

Working on an existing PHP project which shouldn’t be using the new routing (it’s all working nicely and I don’t want to change it all at the moment) but as soon as I save a page file it removes this line:

<meta name="ac:route" content="/product/:productslug/:slug1?/:slug2?/:slug3?/:slug4?/:slug5?">

and that breaks the page. I’ve had to insert it back again via a separate text editor but as soon as I save the page again in Wappler it removes that line.

Help!

What page are you working on? A content page, a full page or a layout page?
Which line does it remove? Please follow: How to format code in your posts

Have you enabled or disabled the experimental routing?

Experimental routing is DISABLED for both global and project so I’m not using the layouts or partials. It’s old-school.

And I’m trying to paste code which shows when editing but not after posting! Grrr. UPDATE: code now included in my original post.

What page are you working on? A content page, a full page or a layout page?
Also how does this route look in the routes panel?

It's a full page. It was all working perfectly before - there aren't any content or layout pages, it was developed before they were available.

If I paste back the meta tag (see my opening post) it all works again. Wappler is removing that every time I save.

Can you post a screenshot of how is the routing configured for this page in the routing panel?

Here it is:

Out of interest have you got a catch all '*' route for 404's Jon? We had a similar problem as the latest update caused issues with several Projects (all using parameters in the route). I've messaged @George with how we resolved it but am happy to share.


Opus 4.6 suggested:

Issue: In routes.js, createApiRoutes() is called after routes.json routes are parsed and registered. Any wildcard route in routes.json (e.g. * or /:page/:lang) will intercept all /api/... requests before API routes are registered, returning an HTML page instead of JSON. Either createApiRoutes() should run before routes.json is parsed, or Wappler should prevent/warn when wildcard routes are added to routes.json.


Maybe the same issue?

No, I don’t have a catch all. I do it by showing the 404 info if a product isn’t found in the database.

1 Like

@Cheese this is a totally different issue here. The issue is that a meta tag is being removed from the page on save, not really related to loading routes in the browser.

1 Like

Is there a fix for this coming? It’s pretty crucial for me at the moment.

I have the same problem, if i open existing file which have in my example

<meta name="ac:route" content="/izdelek/:id/:slug_path*">

and just save it, the line disappear and my links on the page stop working. It disappear if line contain meta name=”ac:route”, if you change the meta name the line stay after saving (but to work it must say ac:route).

1 Like

I have this problem as well. Php project, v 7.7.5

I save, have to open the php file in a text editor and manually add it back. If i add it via wappler it is removed when I hit save.

1 Like

@George - will the fix for this be in today's update?

yes this will be fixed in the todays update

2 Likes

Fixed in Wappler 7.7.6

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.