I'm getting a post not found. The URL generated is also

I'm getting a post not found. The URL generated is also weird, http://<mysite>/index.php//wiki/module-container/
Where it's adding the extra slash in there, which I assume is an error/collision with permalinks settings and wiki for whatever reason. Obviously other content works just fine, this is the first time I've seen this, just after installing wiki and attempting to use it.

  • Mindblaze
    • The Incredible Code Injector

    Hi Mike,

    Welcome to the community!

    Actually index.php should not be showing up in your URL path either.

    Is it possible for you to give us a link to your website ?

    Try one little thing, goto Settings > Permalink page in wordpress backend and then reload the wiki page again

    It flushes the rewrite rules this way :slight_smile:

    Hope it helps

  • mike_earley
    • Flash Drive

    I can't give a link to the website, it's internal/private corporate. :slight_frown: Makes things harder.

    We had to implement this permalink custom structure: /index.php/%postname%/ because of some issue that was occuring where pages weren't loading without it being there (I don't remember why off hand, my co-worker handled it).

    I went to permalinks, clicked on a radio button (the same custom one, didn't change it), and saved changes, go the 'permalinks updated' message (assuming that flushes the rewrite). Still seeing the same //wiki format as above.

  • mike_earley
    • Flash Drive

    You know what, I can't seem to FIND my site's .htaccess file.

    [root@<mysite> html]# ls -l
    total 176
    -rw-r--r--.  1 root   root       0 Apr  5 11:41 index.html
    -rw-r--r--.  1 root   root     395 Apr  4 09:42 index.php
    -rw-r--r--.  1 root   root      95 May  2 14:28 info.php
    -rw-r--r--.  1 root   root   19929 Apr  4 09:42 license.txt
    drwxr-xr-x.  8 root   root    4096 Apr  4 08:57 phpMyAdmin
    drwxr-xr-x.  8 root   root    4096 May  3 12:54 q2a
    -rw-r--r--.  1 root   root    9177 Apr  4 09:42 readme.html
    -rw-r--r--.  1 root   root    4663 Apr  4 09:42 wp-activate.php
    drwxr-xr-x.  9 root   root    4096 Apr  4 09:08 wp-admin
    -rw-r--r--.  1 root   root     271 Apr  4 09:42 wp-blog-header.php
    -rw-r--r--.  1 root   root    3522 Apr  4 09:42 wp-comments-post.php
    -rw-r--r--.  1 root   root    3591 May  3 08:03 wp-config.php
    -rw-r--r--.  1 root   root    3177 Apr  4 09:42 wp-config-sample.php
    drwxrwxrwx. 11 apache apache  4096 May  3 08:04 wp-content
    -rw-r--r--.  1 root   root    2718 Apr  4 09:42 wp-cron.php
    drwxr-xr-x.  9 root   root    4096 Apr  4 09:09 wp-includes
    -rw-r--r--.  1 root   root    1997 Apr  4 09:42 wp-links-opml.php
    -rw-r--r--.  1 root   root    2408 Apr  4 09:42 wp-load.php
    -rw-r--r--.  1 root   root   29310 Apr  4 09:42 wp-login.php
    -rw-r--r--.  1 root   root    7723 Apr  4 09:42 wp-mail.php
    -rw-r--r--.  1 root   root    9899 Apr  4 09:42 wp-settings.php
    -rw-r--r--.  1 root   root   18219 Apr  4 09:42 wp-signup.php
    -rw-r--r--.  1 root   root    3700 Apr  4 09:41 wp-trackback.php
    -rw-r--r--.  1 root   root    2719 Apr  4 09:41 xmlrpc.php
  • Vaughan
    • Support/SLS MockingJay

    hiya

    yes i've just done some testing on my test site.

    this does seem to be a bug with the wiki plugin, when the pretty URL method is using PATHINFO instead of mod_rewrite.

    I will report this as a confirmed bug.

    Though, your server does have mod_rewrite so ideally you should utilise that.
    I know you said your developer had some issues. not sure what they are, but i can see you have mod_rewrite loaded.

    could you also check that these are also set in apache?

    The FollowSymLinks option enabled
    FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)

    the reason you can't remove the index.php from the permalinks is pretty much because as you have found, there is not .htaccess file for your site.

    if you create the htaccess file, then more than likely you can use the preferred and better method of pretty urls.

    the htaccess are pretty much the same other than slight differences for multisites & single installs.

    you can try creating a .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    then make sure it's writeable by wordpress (i the script owner)

    chmod 755 should do.

    wordpress should be automatically able to create it, but it maybe that wordpress doesn't have permissions to create the file in the public_html of your site. in which case creating it manually should do the trick.

    hope this helps, let me know if this solves it, in the meantime, I'll inform the developer so he can look into the issue when PATHINFO is used.

    thanks.

  • mike_earley
    • Flash Drive

    OK--Transmit id10t error here, I didn't have 'show invisible files' enabled, and I'm not sure why it wasn't showing through the command line interface. Anyway, either it wasn't there before when I posted, and WP created it, or it WAS there. Here is its content, which appears to match what you've done above anyway.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  • Vaughan
    • Support/SLS MockingJay

    hiya

    ok, that should allow you to remove the index.php from the permalinks then.

    make sure it's writeable though.

    also just in case can you check your apache at all? make sure that the following are enabled, this also is required for the permalinks.

    The FollowSymLinks option enabled
    FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)

    if you have control of your server, then they are in the apache httpd.conf

    alternatively, you can also try adding this to the top of the .htaccess file

    Options +FollowSymLinks +SymLinksIfOwnerMatch

    try it without +SymLinksIfOwnerMatch 1st, then try with.

    hope this helps.

  • Vaughan
    • Support/SLS MockingJay

    yes, you will probably need those lines :slight_smile:

    incidentally though, i have just been reading, depending on your host. especially if it's godaddy, the changes in htaccess could take upto an hour to become effective as godaddy uses some weird htaccess refresh system.

  • mike_earley
    • Flash Drive

    I believe my 'host' is a computer under my coworker's desk. This is an internal design library/knowledge site.

    So there are a few things here...

    What it is, currently:

    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    change it to:

    <Directory />
        Options FollowSymLinks
        AllowOverride All
    </Directory>

    And, current:

    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
        Options Indexes FollowSymLinks
    
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
        AllowOverride None
    
    #

    Change to:

    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
        Options Indexes FollowSymLinks
    
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
        AllowOverride All
    
    #

    Is that all?

  • mike_earley
    • Flash Drive

    Good and bad news. The good news, all of the changes we made allows normal pretty permalinks to work now, no more /index.php/%postname%/.

    I restarted the server. I made the permalink change. I hard-refreshed the browser. I successfully loaded a normal post with the new permalink structure (so, mod_rewrite is working, etc).

    I deleted the wiki entry I had in the db, and added a new one. Still getting not found.

    http://<mysite>/wiki/testing-wiki/ is now the URL, which looks 'healthy' but doesn't work.

    Field	Value
    ID	731
    post_author	1
    post_date	2013-05-09 19:15:06
    post_date_gmt	2013-05-09 19:15:06
    post_content	testing
    post_title	Testing Wiki
    post_excerpt
    post_status	publish
    comment_status	open
    ping_status	open
    post_password
    post_name	testing-wiki
    to_ping
    pinged
    post_modified	2013-05-09 19:15:06
    post_modified_gmt	2013-05-09 19:15:06
    post_content_filtered
    post_parent	0
    guid	http://<mysite>/?post_type=incsub_wiki&p=731
    menu_order	0
    post_type	incsub_wiki
    post_mime_type
    comment_count	0
  • mike_earley
    • Flash Drive

    Deactivated plugin. Deleted plugin. Redownloaded 1.2.3.4. Installed and activated. Still getting page not found. And, yes, I'm also contacting the theme developer.

    http://<my_site>/wiki/2nd-test/

    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 184
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 191
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 196
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 203
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 210
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 217
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 224
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 231
    
    Notice: Trying to get property of non-object in /var/www/html/wp-content/themes/buddy/lib/inc/page-styling.php on line 237

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.