WordPress.org

Ready to get started?Download WordPress

Forums

Virtual Theme
error 404 (21 posts)

  1. exportquality
    Member
    Posted 3 years ago #

    my WP is installed in a sub folder, and a 404 is what i see when i go to the virtual path.

    http://www.example.com/test/virtualpath

    http://wordpress.org/extend/plugins/virtual-theme/

  2. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    I'll take a look at it.

  3. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    Ok, I finally got a chance to look at this.

    2 things to note.

    1) you need permalinks turned on for the plugin to work.

    2) there was a bug with wordpress being installed in a subfolder which should now be fixed. I installed a local copy of wordpress which I used to test and it seems to be working fine, I'd be interested in seeing if this fixed things for anyone having problems before.

    -Max

  4. cfebrian
    Member
    Posted 3 years ago #

    I'm having the same issue running 3.1.1 with a network. Have you tried enabling the multisite network for a test?

    If so, have you tried to use categories and tags? On my site it fails for site #1 because of the "blog" issue related to the first site in the network.

    The wordpress permalinks add "blog" in front of posts/pages but not for categories and tags. I can get virtual theme to work for posts if I add a virtual path as /blog/path and it will work for pages/posts.

    However if I try /blog/path/categories/catname it doesn't work. It redirects to the site root.

    I haven't solved this issue for categories and tag listings but I think I found another possible bug. If you look at line 102:

    if ($this->urlMatches($dt['url'], $this->currenturl)){

    It calls urlMatches. urlMatches on line 138 is:

    return strpos($url, $prefix);

    What I found is that it would return 0 if it matched certain strings which was evaluated as false and would not execute for that path when the match was at position.

    So '/path' would not work but '/blog/path' would work because urlMatches returned the number 5.

    It didn't have these issues before. It seems related to wordpress multisite forcing the blog prefix.

  5. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    cfebrain,

    Thanks for the strpos catch. I added a === false to fix it.

    I'll take a look at the categories and tags bug you found, but not sure if I will have time to get to it before this weekend.

    -Max

  6. forumcivico
    Member
    Posted 3 years ago #

    Same problem with WP 3.1.1 with network sites and Virtual Theme 1.0.8.

  7. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks forumcivico. WordPress has some hooks to filter the permalinks that I think may fix this. Hoping to have them added and release 1.0.9 this week. Likely tomorrow or wednesday

  8. forumcivico
    Member
    Posted 3 years ago #

    Thank you mobilesentience for the new version. It still throws error 404 on WP 3.1.2 with network sites. I will wait for the fix, your plugin is very useful, and as far as I know, the only one of the kind.

    Thank you.

    PS: Our network setup is using third level domains, not subfolders.

  9. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    I'm going to try and get wp with network sites set somewhere this weekend so I can figure out whats going on there.

    Thanks for the complement, also as far as I know as well it is the only one of its kind. Thats the reason I wrote it, I needed it for a site and couldn't find anything.

  10. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    I have Virtual Theme using the rewrite rules now instead of faking it with $_SERVER['REQUEST_URI']

    Hopefully this will fix multi-site networks.

    Please, let me know either way.

  11. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    BTW, looks like you will have to go to "other versions" and download the development version to test this.

    For some reason the plugin gallery isn't updating to the new version. It's still sitting 2 versions back at 1.0.9

  12. cfebrian
    Member
    Posted 3 years ago #

    Thanks for the updates. I will plan on testing it tomorrow and let you know if it solved my previous issues.

  13. forumcivico
    Member
    Posted 3 years ago #

    Thank you!

    I tried to install the developer version, and I got:

    "Fatal error: Unsupported operand types in /home/vsm/public_html/wp-content/plugins/virtual-theme/VirtualTheme.php on line 94"

    PS: I will be away until Tuesday. I will check again next Wednesday.

  14. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    hmm, you shouldn't have had that with the tagged version. But I think something is going on with the svn server. I haven't been able to connect all day. And Virtual Theme is still stuck at version 1.0.9

    I'll check back on it tomorrow or this weekend.

  15. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    Ok, we are getting somewhere. 1.0.11 finally showed up in the gallery. I found the reason for the Fatal error: one of the bug changes was to fix how I was storing options. I based this off another plugin and it was my first attempt at a WordPress plugin. The plugin I based Virtual Theme off of has some messed up code for storing and getting the options that is actually a fairly common bug. Basically serializing stuff twice.

    Anyway I had some code to preserve settings that tried to deal with that so when I started the new way nothing was missed. Long story short that was causing the new rewrite thing to try an append an array which was never set(in some cases) to another.

    I added a check to prevent that.

    I fixed a few other bugs with the conversion of the old options to new.

    Also a bug where when you auto update the rewrite rules don't get written, it requires either the vpaths to be changed(add, delete or edit will do it) or the plugin to be deactivated and then reactivated. That is now fixed.

    I suspect that Multisites may not work 100% yet, and that I might have to write a few new rules. If anyone wants to test this when they get a chance and post any url's that don't work. Actual urls would work best.

    I can then get the additional rewrite rules added.

    1.0.12 should be up this afternoon. Well in SVN this afternoon, who knows when if ever the gallery will notice that.

  16. cfebrian
    Member
    Posted 3 years ago #

    I tested version 1.0.1 on a fresh install and I could not get it to work. I kept getting 404 errors.

    It turns out that my .htaccess was not writable. The permalinks option will warn you and provide you with the code to copy into .htacess.

    I would recommend adding the feature like permalinks or add a note to the readme to avoid issues for future users of the plugin.

    I need to test it on a multisite install and report any issue I find. Thanks again for your awesome work on this needed feature.

  17. mobilesentience
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for all the testing and reporting.

    The readme and description do mention needing permalinks enabled, but I will be more clear about .htaccess needing to be writable, and add a permalinks like feature with the rules so they can be cut and pasted to the .htacccess by hand.

    Not sure when I will be able to get at that though, likely Sunday or Monday.

  18. telecal
    Member
    Posted 3 years ago #

    I'm running WP 3.1.2 Network site and the latest version (1.0.14) and still getting 404. Can you give us more instructions about .htaccess? Do I have the choice to change it manually without it being writable?
    Thanks!

  19. onna
    Member
    Posted 2 years ago #

    I'm also getting a 404 error, I'd really like to get this plugin working, also - I tried registering to your support forums, but no password were sent to either email I registered twice.

    The site I'm trying to get this working is DJHymn.com

  20. gsbzhanan
    Member
    Posted 2 years ago #

    My entire dashboard has disappeared, as have all my WordPress pages. I created a virtual path to my contact page to see if it changed and nothing happened. I deleted the cache and everything went white and now nothing shows. I get Error 500.

    Let me know what to do to restore this!

  21. binaa
    Member
    Posted 2 years ago #

    hey gsbzhanan,

    I got an error 500 while experimenting too. I deleted my .htaccess file from root and everything was fine again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic