Xepher.Net Forums

Xepher.net => Technical Support => Topic started by: fesworks on December 22, 2008, 03:09:58 PM

Title: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: fesworks on December 22, 2008, 03:09:58 PM
I just had tried to get both PSI and Ardra upgraded to Wordpress Plugins for Webcomic & Inkblot (http://maikeruon.com/wcib/). I was working with the creator on the sites, and no matter what, we could not figure out what the issue was. The error continued to return that there was an error in the script, however, it's the same code that is used on several other sites.

We surmise that the Wordpress theme and plugin combo, merely does not work on Xepher... though we cannot find any sort of explanation. We thought it was the .htaccess at one point, but it does not see to make a difference.

Soooo, mostly I'm making this post to say that if you are considering these for your wordpress-based webcomic, stick with ComicPress, I 'spose.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Xepher on December 23, 2008, 12:21:46 AM
What errors were you actually getting? Because I'm just running Apache, like nearly 2/3 of all servers on the net do. There shouldn't be any reason why it doesn't work, unless it needs some particular perl module that's not installed. Gimme the error that's actually happening and I can probably figure out what the problem is.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: fesworks on December 23, 2008, 03:06:16 PM
See, the errors are always something with something not parsed right in the hard code of the plugin (or theme?) itself. He's not getting any server errors.

But I'll ask him again, and see if I can recall the specific info.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: LunarZero on December 23, 2008, 03:18:19 PM
Hi Xepher, I'm the author of WebComic & InkBlot. The specific error (for WebComic) is:

Parse error: syntax error, unexpected T_ENDFOREACH in /home/fesworks/public_html/PSI/wp-content/plugins/webcomic/wc-admin.php on line 631

I've looked over the WebComic code a number of times and can't for the life of me figure out why that error would be showing up. The exact same version of WebComic is running on a number of other websites without any issues... if it really were a syntax error I'd think more WordPress installations would be throwing up similar errors. If you can help out that'd be great. XD
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Databits on December 23, 2008, 06:52:39 PM
This means that it's attempting to parse an "endforeach" without a preceding "foreach" loop. There's nothing on Xepher's server that would cause that, it's a PHP syntax parsing error.

If you'd like I can probably take a look at the issue. Is this a new installation of the latest code base for this software?

Actually, if you could take the entire contents of that particular file and place it in this thread within a code block that'd be helpful (remove any sensitive stuff like usernames/passwords first of course).  :P
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: LunarZero on December 23, 2008, 07:03:20 PM
I know what the error's referring to, but there is a preceding foreach loop... if there wasn't every time anyone tried to install the plugin that same error would come up. I'm hesitant to post the contents of that entire file here (due to size) but you can download the plugin here (http://wordpress.org/extend/plugins/webcomic/).
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Databits on December 23, 2008, 08:49:35 PM
That was a pain in the ass but I found your problem. You're using a short tag for the end of an if statement on line 623 of that file.

Replace:<?php if($comic_thumb): ?><td><a href="<?php echo $post['file'?>"><img src="<?php echo $post['thumb'?>" alt="<?php echo $post['name'?>" /></a></td><? endif; ?>

With:
<?php if($comic_thumb): ?><td><a href="<?php echo $post['file'?>"><img src="<?php echo $post['thumb'?>" alt="<?php echo $post['name'?>" /></a></td><?php endif; ?>

And you'll find your problem goes away.  ;)

The reason may be that short tags are disabled on Xepher.net, which isn't all that uncommon. Since it's missing the end tag on that if statement (can't parse that), it's expecting the endif before the endforeach.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: LunarZero on December 23, 2008, 09:02:16 PM
Thanks a lot for finding that; that definitely shouldn't be a short tag. XD I'm doing a major rewrite of that code anyway for the next release... I guess I had better triple check to make sure I didn't use any short tags by accident anywhere else.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Databits on December 23, 2008, 09:32:52 PM
No problem, that's generally one of the things I'm around for.

A Xepher.net resident programmer. :P
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: fesworks on December 24, 2008, 03:13:55 AM
Quote from: LunarZero on December 23, 2008, 09:02:16 PM
Thanks a lot for finding that; that definitely shouldn't be a short tag. XD I'm doing a major rewrite of that code anyway for the next release... I guess I had better triple check to make sure I didn't use any short tags by accident anywhere else.

*wap*
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: amuletts on January 19, 2009, 12:24:18 AM
WOW.  Well done for tracking that down.  I think I'll stick with comicpress for now though :D
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Miluette on February 15, 2009, 04:12:55 PM
I juuust installed Inkblot and WebComic, and Firefox is telling me this whenever I go to a not-main-page:

QuoteRedirect Loop         

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete.

    * Have you disabled or blocked cookies required by this site?
    * NOTE: If accepting the site's cookies does not resolve the problem, it is likely a server configuration issue and not your computer.

I'm gonna assume it's because of the above mentioned.

Wait, maybe not. Guh. My first foray into CMS is killing me slowly. See here: http://lf.senshuu.com/pages/ click any navigation, I dare you
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: fesworks on February 15, 2009, 05:33:33 PM
send an e-mail to mike@maikeruon.com about it. I'll mention it to him when I see him online next as well. I'm considering the change-over to Webcomic and Inkblot as well... ComicPress's new update is starting to get on my nerves with how much you have to mess with the theme to update something now.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Xepher on February 15, 2009, 06:42:18 PM
It's probably because you have a ton of redirects for all the sub-sections of your site. One of the directory slash ones is getting in the way. At the top of your main .htaccess for the whole site, you have


RewriteCond    %{REQUEST_URI}  !(.+)\.(.+)$
RewriteCond    %{REQUEST_URI}  !(.+)/$
RewriteRule    ^(.+)$           http://%{HTTP_HOST}/$1/  [L,R]

Which basically says "if there's no dot in the last part of the URL, then assume it's a directory and add a slash. Wordpress wants it's URLs to end in things like "56" without a dot in the "filename" part, and so they have a fight about it.

I fixed it by adding this to the above rules.

RewriteCond    %{REQUEST_URI}  !^/pages/

Note that if you have any other directories named "pages" it's gonna do the same thing for them too, but it should be good enough for now.



Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Miluette on February 15, 2009, 06:56:25 PM
Oh, Xepher, you are magic. How did I live before knowing you? ;x; lol. <3

Somehow I had the feeling it had to do with my redirects, but I wouldn't have known how to fix it. %D
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: fesworks on February 16, 2009, 02:21:44 AM
Magickal Xepher is Magickal :P
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Miluette on February 21, 2009, 08:16:03 AM
A new phenomenon: Millennium's new wordpress'd archives not working right.

http://millennium.senshuu.com/pages/archive Clearly correct and automatically-generated URLs lead to 404s. D: I have the feeling it's something I did, except LF's archives are set up the exact. same. way.

My permalink setting on both:

/%postname%/

And some of the pages work. Just very few of them.

Actually, there is a fix: Mike added .html to the end of the permalink on Mil and everything works, like so.

/%postname%.html

But why stuff breaks with that particular permalink setting on just Mil's archives is beyond both of us!

For now I've left .html on the end just so everything won't be broken overnight... I'm okay with that solution really (it's ingenious XD), but curiosity has driven me to see if anyone has any ideas as to why this might be happening, and I gotta know before I fix various links throughout my site.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Xepher on February 21, 2009, 03:43:00 PM
Quote from: Xepher on February 15, 2009, 06:42:18 PM
Note that if you have any other directories named "pages" it's gonna do the same thing for them...

The fix I put in place for the LF wordpress is probably breaking this new one. I'd suggest removing my fix, and changing the permalink setting to end in .html for all your wordpress installs.
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Miluette on February 21, 2009, 11:39:54 PM
Your mean the .htaccess in LF's pages directory? Because it was doing that even before I modified Mil's to do the same thing. Unless you modified the one in LF's main directory (or any other) that I also forgot about...

I didn't think you meant "pages" directories everywhere, lol, although that'd make sense... er... I was gonna leave Mil's WP install in something named differently but it was awkward, and now I can't think of anything better to name it (since there're "archive" and "comic" directories within WP).
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Databits on February 22, 2009, 06:36:17 PM
Honestly, after seeing the source code for WP, it's kinda poorly written software. Then again that's generally what you get with OSS.

But aside that, if you have issues with something PHP oriented, feel free to IM me on AIM/YahooIM. Just make sure to state who you are on the Xepher forums so I know who it is I'm talking to. I can help most cases as I'm a very experienced programmer. Just keep in mind that at times I may not respond because I'm not actually at a computer. ;)
Title: Re: Xepher does not play well with Webcomic+Inkblot Wordpress Plugins
Post by: Miluette on February 23, 2009, 04:49:40 AM
Quote from: Databits on February 22, 2009, 06:36:17 PM
But aside that, if you have issues with something PHP oriented, feel free to IM me on AIM/YahooIM. Just make sure to state who you are on the Xepher forums so I know who it is I'm talking to.

We've talked once before :gonk:

lol, you'll know it's me anyway. I have no idea what WP's source code is like, just the few individual pages I've edited, which are all nice and full of PHP and xhtml valid.