XoopsModules25x / news

With this XOOPS module, you can create an unlimited number of news on your site. You can create all the articles you want and attach them to topics.
4 stars 11 forks source link

Bug error 404 : the server sends a 404 error and the page is working correctly #23

Closed montuy337513 closed 2 years ago

montuy337513 commented 2 years ago

A funny bug, with the News module. Maybe with other modules too.

On any page of the site (front / back), the server returns me a 404 error header. The pages are displayed correctly. Some JS functionality is disrupted. Example: Activate / deactivate a module in the "Module manager". For the changes to show, I have to reload the page. Another example: the notification bubble that appears with a late page.

Here is the screenshot of my console image

The fault is the /preloads/index.php file If I delete it, I find my headers 200

I think the Core loads all the PHP files present in / preloads. Including the index.php which asks the server to send a 404 header. The page is displayed correctly, if we did not work with an open console next to it. We can miss the problem.

Recommendations:

zyspec commented 2 years ago

Interesting problem.  The core XoopsPreload::setPreloads() method does check for index and discards it.  The issue must be somewhere else.  Can you tell us which version of XOOPS you're using?

montuy337513 commented 2 years ago

The latest version for production : Xoops 2.5.10 Final. I tested by removing 1 by 1 all index.php. It is only /preloads/index.php that causes this error.

mambax7 commented 2 years ago

Thanks! It was fixed in https://github.com/XoopsModules25x/news/commit/c7f65a2762b4ce279954c8a7350c20a21679dabb