WordPress.org

Support

Support » Plugins and Hacks » Virtual Theme » [Plugin: Virtual Theme] error 404

[Plugin: Virtual Theme] error 404

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author mobilesentience

    @mobilesentience

    I’ll take a look at it.

    Plugin Author mobilesentience

    @mobilesentience

    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

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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

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

    Plugin Author mobilesentience

    @mobilesentience

    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

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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

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

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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.

    Plugin Author mobilesentience

    @mobilesentience

    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.

    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.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Plugin: Virtual Theme] error 404’ is closed to new replies.
Skip to toolbar