We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Server error '404 Not Found' on 'index' route | Forum

Marco Giaccaglini
Marco Giaccaglini Apr 16 '19

Hello everybody, 


I am installing the Oxwall software and I have the following problem:


--> when requesting the 'index' main page I have the following error:

---------------------

404 Not Found

The requested URL /oxwall/index was not found on this server.

---------------------


You can test yourself at the following link: http://www.saintclubmilano.it/oxwall/index


The installation is fresh, just new, only base Oxwall, and is as follows:


Oxwall version: 1.8.4 (last official)

Directory of installation: /oxwall

Installation with: Softaculous 5.1.5

Server: Linux standard

PHP version: PHP5.6

Same server: WordPress 5.1.1   (installed in the root, http://www.saintclubmilano.it)


The values in the table 'ow_base_menu_item' for type 'main' routes are as follows (look correct):


idprefixkeydocumentKeytypeorderroutePathexternalUrlnewWindowvisibleFor

23basemain_menu_indexmain2base_indexNULLNULL3

41baseusers_main_menu_itemmain4usersNULLNULL3

211basebase_join_menu_itemmain3base_joinNULLNULL1

304basedashboardmain1base_member_dashboardNULLNULL2

500photophotomain5view_photo_listNULLNULL3

502videovideomain6video_list_indexNULLNULL3


To complete the picture, other pages give 404 'Not Found', here are the statistics:

1.      /oxwall/index4129.29%

2./oxwall/ow_static/plugins/admin/css/images/admin-pages-menu-main.jpg2618.57%

3./oxwall/ow_static/plugins/admin/css/images/admin-pages-menu-bottom.jpg2618.57%

4./oxwall/ow_static/plugins/admin/css/images/btnl_bg.png2618.57%

5./oxwall/ow_userfiles/plugins/base/favicon.ico


If I activate Oxwall debug mode the error log (ow_log/error.log) is the following:


[Tue Apr 16 1:02:39 2019] [ow_core_log] [Warning] Message: Can't generate URI! Route `index` not found! File: /web/htdocs/www.saintclubmilano.it/home/oxwall/ow_core/router.php Line:236


All the other 'route' work fine (eg: users, base_member_dashboard, base_join, view_photo_list, video_list_index, see table table 'ow_base_menu_item' above)


It must be something very tricky as this is just a fresh installation and all the other routes work fine.


Can anybody help? I am stuck at the moment and, sure, route 'index' is quite important ...


Thanks in advance, 

Marco


Marco Giaccaglini
Marco Giaccaglini Apr 16 '19


TABLE  'ow_base_menu_item' for type 'main'


id      prefix          key                     documentKey     type         order                   routePath      externalUrl   newWindow            visibleFor

23      base            main_menu_index         main            2            base_index              NULL           NULL          3

41      base            users_main_menu_item    main            4            users                   NULL           NULL          3

211     base            base_join_menu_item     main            3            base_join               NULL           NULL          1

304     base            dashboard               main            1            base_member_dashboard   NULL           NULL          2

500     photo           photo                   main            5            view_photo_list         NULL           NULL          3

502     video           video                   main            6            video_list_index        NULL           NULL          3


ArtMedia
ArtMedia Apr 16 '19
this is htaccess problem, install oxwall on subdomian, then everything should be ok
Marco Giaccaglini
Marco Giaccaglini Apr 16 '19
Thanks ArtMedia.

You mean to configure something like:  community.saintclubmilano.it and use as Oxwall access?

Any way to change the configuration of htaccess?  Add a .htacces file in /oxwall ?

Oxwall is already partitioned from root. It is installed in saintclubmilano.it/oxwall


Thanks, very useful info.

ArtMedia
ArtMedia Apr 16 '19

Read about this

https://stackoverflow.com/questions/704102/how-does-rewritebase-work-in-htaccess

Marco Giaccaglini
Marco Giaccaglini Apr 17 '19
Hello ArtMedia, all, 


I have checked .htaccess in the oxwall dir and is ok.

In fact you can see that the index.php is correctly called and the error is in ow_core/router.php file (line 236). So it is can/should be core configuration problem.


Error:

[Tue Apr 16 1:02:39 2019] [ow_core_log] [Warning] Message: Can't generate URI! Route `index` not found! File: /web/htdocs/www.saintclubmilano.it/home/oxwall/ow_core/router.php Line:236


The sequence (apparently) is:


index.php

route.php

router.php 


Failing line 236 in router.php


if ( isset($this->routes[$routeName]) )        {            return $this->routes[$routeName]->generateUri($params);        }
        trigger_error("Can't generate URI! Route `" . $routeName . "` not found!", E_USER_WARNING);


where:


$routeName  = 'index'


so: isset($this->routes[$routeName])  is (apparently) failing, meaning that for $routeName there is no routes[] configured ...


Who can help on this?

Marco



ArtMedia
ArtMedia Apr 17 '19
you must edit oxwall core files earlier, on default oxwall instalation dont exist "index" route, "base_default_index" or "base_index" exist
The Forum post is edited by ArtMedia Apr 17 '19
Marco Giaccaglini
Marco Giaccaglini Apr 18 '19

Hi ArtMedia, 


yes, I tried and true: base_default_index exists and (as a workaround) can be used as Main (NOTE: in fact this routes goes to the User Dashboard, so already accessible from 'Dashboard' menuitem, or base_member_dashboard route).

The 'base_index' is the (only) missing/faulting route.

Can be re-activated? I am a bit confused as this (base_index) should be just present in a fresh installation ... correct?


In addition, the following routes (apparently) are a duplication/just same page:


base_default_index     (OK)

base_member_dashboard  (OK)


e.g. both routes generate a page that has 'My Dashboard' as page name ...


How is that?


General question:


I understand that the table TABLE  'ow_base_menu_item' is the config place for Menu.

Where is the table for configuring the core routes/pages? That is to say the basic configured:


base_join              (OK)

base_default_index     (OK, directs to base_member_dashboard)

base_index             (FAIL, not present on base installation v. 1.8.4)

users                  (OK)

base_member_dashboard  (OK)

view_photo_list        (OK)

video_list_index       (OK)


TABLE  'ow_base_menu_item' just after installation:


id      prefix          key                     documentKey     type         order           routePath           externalUrl   newWindow            visibleFor

23      base            main_menu_index          main            2            (base_index FAILING)    NULL           NULL          3

41      base            users_main_menu_item     main            4            users                   NULL           NULL          3

211     base            base_join_menu_item      main            3            base_join               NULL           NULL          1

304     base            dashboard                main            1            base_member_dashboard   NULL           NULL          2

500     photo           photo                    main            5            view_photo_list         NULL           NULL          3

502     video           video                    main            6            video_list_index        NULL           NULL          3






Marco Giaccaglini
Marco Giaccaglini Apr 18 '19
Hello again ArtMedia, all, 


some more information on the configuration (and routPaths and generated URIs)

You can directly test at the link: http://www.saintclubmilano.it/oxwall/ 

Currently I have:


TABLE 'ow_base_menu_item'


Menu Item (key)                   routePath

main_menu_index                 base_default_index    

users_main_menu_item      users

base_join_menu_item         base_join

dashboard                         base_member_dashboard

photo                               view_photo_list

video                                video_list_index


This configuration generates the live menu as follows:


Menu Item                            live generated menu links (URL/URI)main_menu_index                 http://www.saintclubmilano.it/oxwall/    users_main_menu_item      http://www.saintclubmilano.it/oxwall/usersbase_join_menu_item         base_joindashboard                         http://www.saintclubmilano.it/oxwall/dashboardphoto                               http://www.saintclubmilano.it/oxwall/photo/viewlist/latestvideo                                http://www.saintclubmilano.it/oxwall/video


So:


routePath                              generates                         goes to page

base_default_index                 oxwall/                             My Dashboardusers                                  oxwall/users                     Memberbase_member_dashboard     oxwall/dashboard              My Dashboard


In addition (FAILING)


routePath                              generates                         goes to pagebase_index                             oxwall/index                       FAIL (404 Page Not Found)



(note: $base is 'oxwall')


Marco Giaccaglini
Marco Giaccaglini Apr 18 '19


Sorry, the forum modifies the post formatting:


Menu Item (key)                routePath                 generated URL/URImain_menu_index              base_default_index        www.saintclubmilano.it/oxwall/users_main_menu_item ;      users                     www.saintclubmilano.it/oxwall/usersbase_join_menu_item ;         base_join                 www.saintclubmilano.it/oxwall/joindashboard ;                      base_member_dashboard     www.saintclubmilano.it/oxwall/dashboardphoto ;                              view_photo_list           /...ist/latestvideo ;                              video_list_index          www.saintclubmilano.it/oxwall/video



routePath                      generates                     goes to page (Page Name)base_default_index             oxwall/                       "My Dashboard"users                          oxwall/users                  "Members"base_member_dashboard          oxwall/dashboard              "My Dashboard"
In addition (FAILING)
routePath                      generates                     goes to pagebase_index                     oxwall/index                  ***FAIL (404 Page Not Found)***

Marco Giaccaglini
Marco Giaccaglini Apr 18 '19

Re-try ... (forum software modifies formatting)


Menu Item (key)              routePath                 generated URL/URImain_menu_index              base_default_index        $sitename/oxwall/users_main_menu_item         users                     $sitename/oxwall/usersbase_join_menu_item          base_join                 $sitename/oxwall/joindashboard                    base_member_dashboard     $sitename/oxwall/dashboardphoto                        view_photo_list           $sitename/oxwall/photo/viewlist/latestvideo                        video_list_index          $sitename/oxwall/video

routePath                      generates                     goes to page (Page Name)base_default_index             oxwall/                       "My Dashboard"users                          oxwall/users                  "Members"base_member_dashboard          oxwall/dashboard              "My Dashboard"
In addition (FAILING)
routePath                      generates                     goes to pagebase_index                     oxwall/index                  ***FAIL (404 Page Not Found)***



Marco Giaccaglini
Marco Giaccaglini Apr 18 '19


impossible reformatting ...  retry ...


Menu Item (key)routePath generated URL/URI

main_menu_index base_default_index $sitename/oxwall/

users_main_menu_item users $sitename/oxwall/users

base_join_menu_item base_join $sitename/oxwall/join

dashboard base_member_dashboard $sitename/oxwall/dashboard

photo view_photo_list $sitename/oxwall/photo/viewlist/latest

video video_list_index $sitename/oxwall/video



routePath generates goes to page (Page Name)

base_default_index oxwall/ "My Dashboard"

users oxwall/users "Members"

base_member_dashboard oxwall/dashboard "My Dashboard"


In addition (FAILING)


routePath generates goes to page

base_index oxwall/index ***FAIL (404 Page Not Found)***



Marco Giaccaglini
Marco Giaccaglini Apr 18 '19
... last try ...  (very bad forum software for tables ...)



Menu Item (key)......................routePath................................generated URL/URI

main_menu_index....................base_default_index...................$sitename/oxwall/

users_main_menu_item...........users..........................................$sitename/oxwall/users

base_join_menu_item..............base_join...................................$sitename/oxwall/join

dashboard ................................base_member_dashboard........$sitename/oxwall/dashboard

photo........................................view_photo_list........................$sitename/oxwall/photo/viewlist/latest

video ........................................video_list_index........................$sitename/oxwall/video



routePath................................generates................................goes to page (Page Name)

base_default_index...................oxwall/......................................."My Dashboard"

users..........................................oxwall/users..............................."Members"

base_member_dashboard........oxwall/dashboard......................"My Dashboard"


In addition (FAILING)


routePath................................generates.................................goes to page

base_index................................oxwall/index...............................***FAIL (404 Page Not Found)***