Duotone PHP Error on WordPress 2.9
-
Hello, i’ve just installed the Duotone theme on a self-hosted wordpress 2.9 instance. I tried the preview and it’s giving me this error:
Warning: Missing argument 1 for is_vertical(), called in […]/wp-content/themes/duotone/functions.php on line 18 and defined in […]/wp-content/themes/duotone/inc/duotonelibrary.php on line 295
I’m currently using Monotone, which is still working fine.
Anyone had a similar problem? Hints?Thanks
E.
-
Hey there,
getting the same error msg on mine aswell. Also using wp 2.9.
“
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/wruuu/public_html/wp-content/themes/duotone/inc/duotonelibrary.php on line 301
Warning: Missing argument 1 for is_vertical(), called in /home/wruuu/public_html/wp-content/themes/duotone/functions.php on line 18 and defined in /home/wruuu/public_html/wp-content/themes/duotone/inc/duotonelibrary.php on line 295
Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/wruuu/public_html/wp-content/themes/duotone/inc/duotonelibrary.php on line 301
“Also the archive does not open at all.
Tried to upload it to another hoster and for some reason it worked fine. I also downgraded to version 1.0 of this thema but getting the same error /msg.
Anyone know to solve this problem?
Cheers
Ok just playing here and there:
Line 18 in functions.php for monotone is
$width = (is_vertical() ? MIN_WIDTH : MAX_WIDTH;
The “Missing Argument” error is apparently solved changing the line like this:$width = (is_vertical($post->image_url)) ? MIN_WIDTH : MAX_WIDTH;
@berrics The “Filename cannot be empty” error still there; same problems with the archives not working.
jup, thanks, the “Missing Argument” error is solved but the other error remain. Anyone knows how to fix it?
Thanks in advance.
The is_vertical issue is solved in the latest release 1.0.1
The other error means that somehow the path to your images isn’t being sent properly to the function.
Do you have a URL where this is happening?
I’m temporarily shifting to duotone here https://www.stilemosso.it so you can take alook. Version is the 1.0.1
PS
The getimagesize error can be seen in the “gears” page.
The archive page (which i guess is dynamic) is giving a “4o4 not found” in the body and an error in the URL! “Missing argument 1 for get_year_link() called in […]/wp-content/themes/duotone/header.php on line 41 and defined in […]/wp-includes/link-template.php on line 286′Ok i don’t want to populate the topic alone but here’s the latest:
– The getimagesize warning seems to appear when there is no image to use as a thumbnail; this happens on posts and pages
(on my side i put images also when i didn’t need them to avoid the error messages, but i think there should be the possibility to have no images)
– The archive page link is not working but the archives do
(eg: ok when using them from the archive widget)One good thing: with some “content tuning” it’s much better yet
One notsogood thing: warnings expose all the paths and break the layoutI have upgraded to 1.0.1 and still getting the same issue as the original post.
PHP 5.2.10
GD 2
WP 2.9I completely deleted and reinstalled the duotone theme with 1.0.1. The two tone colors are changing to match the photos, exif data is being displayed, but no photo is displayed.
Message in browser:
Warning: Missing argument 1 for is_vertical(), called in /var/www/wp/wp-content/themes/duotone/functions.php on line 18 and defined in /var/www/wp/wp-content/themes/duotone/inc/duotonelibrary.php on line 295Message from php.log:
[30-Dec-2009 16:28:03] PHP Warning: Missing argument 1 for get_year_link(), called in /var/www/wp/wp-content/themes/duotone/header.php on line 41 and defined in /var/www/wp/wp-includes/link-template.php on line 286
[30-Dec-2009 16:28:03] PHP Warning: Missing argument 1 for is_vertical(), called in /var/www/wp/wp-content/themes/duotone/functions.php on line 18 and defined in /var/www/wp/wp-content/themes/duotone/inc/duotonelibrary.php on line 295monotone works just fine. every other theme i’ve installed works just fine.
Hello!
Here’s my hacks for the warnings found til now:1) Missing argument 1 for is_vertical(),
Change$width = (is_vertical() ? MIN_WIDTH : MAX_WIDTH;
into$width = (is_vertical($post->image_url)) ? MIN_WIDTH : MAX_WIDTH;
in functions.php or upgrade to verson 1.0.1 as sayd by Noel2) getimagesize() [function.getimagesize]: Filename cannot be empty
Work on content: make sure that every post has an image associated3) Missing argument 1 for get_year_link()
change<?php echo get_year_link(); ?>
into<?php echo get_year_link(''); ?>
in header.php4) 404 not found error on archives page
Work on content: make sure that there is almost one item posted in the last yearPS:
to developers:
about 2) and 4) it would be good to allow to have also posts/pages without images and to avoid error messages if there are no recent-recent posts (as it may happen on jan the 1st ??I have changed the header.php and function.php as described above and am not getting the “missing argument” error anymore.
But…
I still cannot get my images to show up not on the individual posts nor in the archive pages.
https://www.langwitches.org/blog/photos/Any help would be appreciated.
Thank youHere is what I did and it worked pretty good:
Put at least one image in each post to avoid the error msg.
Change the functions.php like Noel said.
To avoid the nasty archive error, just put the archive-url https://www.yourdomain.com/2010/ buy yourself into the header.
…and by the way thanks for the nice theme! ??
Oh and on another note it seems like can NOT post images which are NOT on your server. In order to safe a little bit of traffic you might want to host some pictures on, lets say, imageshack but then the theme turns the Url into:
<img src=”/wp-content/themes/duotone/inc/thumb.php?image=https://img15.imageshack.us/img15/2448/1235.jpgw=840″ border=”0″/>
Or am I missing something here? The WordPress HTML Editor says
<img style=”border: 0pt none;” src=”https://img15.imageshack.us/img15/2448/12345.jpg” border=”0″ alt=”” width=”1218″ height=”734″ />
I’m also having problems with this theme and would really like to see them fixed. I tried hacking the files as instructed here but must have screwed something up. I’m hoping a new, fixed version is available soon. I like this theme much more than its predecessor, Monotone.
Thanks.
I have changed the php in functions.php to:
$width = (is_vertical($post->image_url)) ? MIN_WIDTH : MAX_WIDTH;This was still missing in 1.0.1, so the upgrade didn’t work.
Still not working. The errors/warnings are gone. The images do not show up. No images are being displayed for every post. All the images are local. All posts have an image. The posts are showing the two tone colors for each image. The posts are showing the EXIF data for the images. Everything else is working properly. Every other theme I’ve installed, including monotone, works properly.
I even completely wiped WP, reinstalled it from scratch with 2.9, reinstalled duotone from scratch with 1.0.1. Changed the functions.php with the missing $post->image_url. Still not showing images. No other plugins, themes, etc are installed.
Hi.
I’m having trouble with the theme. I have done everything mentioned above to fix those problems. However, my problem is that images I posted do not show up.
Here is my photoblog: https://ttcceo.site50.net/photo/
Please take a look at it and tell me what to do to fix this problem.
Thanks.
- The topic ‘Duotone PHP Error on WordPress 2.9’ is closed to new replies.