0.8 shortcomings.. is this beta?

Found a bug? Tell us!!
Post Reply
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

0.8 shortcomings.. is this beta?

Post by joho »

Is it just me, or does 0.8 feel like a beta?

I cannot enable the WYSIWYG editor no matter what I do. I set it to enabled and save, and then it's disabled. If I forgot something, fine; but I get no warning or error whatsoever.

When I chose to insert media from the media library, I just get a clumsy <a href..> inserted; with the previous releases I was presented with options that allowed me to link the image to a number of places, and whether or not I wanted to use the thumbnail or the full image in my entry..

It's probably me doing all sorts of things wrong..
At the end of a smile, there is a laugh and a 1/2 [DAD]
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Re: 0.8 shortcomings.. is this beta?

Post by joho »

joho wrote:I cannot enable the WYSIWYG editor no matter what I do. I set it to enabled and save, and then it's disabled. If I forgot something, fine; but I get no warning or error whatsoever.
Weird.. I was apparently changing the global system setting, and not the setting under "Personal Settings". I still cannot change the global system setting; but the at least the setting under "Personal Settings" seem to stick.
At the end of a smile, there is a laugh and a 1/2 [DAD]
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

In regards to the media library, what type of file are you inserting into your post?

From what I have seen the library will autodetect images vs. other media and change its behavior based on that.

ie, for images I get the same old insert options (jpeg/gifs, I have no pngs), but other media it just inserts the link.
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

image/jpeg, image/jpg, image/gif, image/png

I've tried uploading new pictures, I've tried using existing pictures, I've tried re-building my thumbnail index, I've tried.. well, just about everything I can think of.
At the end of a smile, there is a laugh and a 1/2 [DAD]
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Would you mind looking in your serendipity_images to see what mime types are listed for your images? Are they correct (I am kind of assuming they are not)?
joho
Regular
Posts: 54
Joined: Mon Oct 25, 2004 10:25 am
Location: Stockholm, Sweden
Contact:

Post by joho »

Here's an example of a recent entry:

image:
joho_20050509_rose_small

extension:
jpg

mime:
image/jpeg


Looks good to me. I checked these before.. and they looked OK then too..
At the end of a smile, there is a laugh and a 1/2 [DAD]
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post by mgroeninger »

Well, I'm glad your problem is consistent at least... :P

You could run something like this:

Code: Select all

<?php 
ini_set("display_errors","on");
include('serendipity_config.inc.php');

$imagenumber = 1;

$file           = serendipity_fetchImageFromDatabase($imagenumber);
$file['imgsrc'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];  
if ($file['hotlink']) {
    $imgName    = $file['path'];
} else {
    $imgName    = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] .'.'. $file['extension'];
}

$thumbbasename  = $file['path'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];

if ($file['hotlink']) {
    $thumbName  = $file['path'];
} else {
    $thumbName  = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $thumbbasename;
}
$thumbsize     = @getimagesize($serendipity['serendipityPath'] . $serendipity['uploadPath'] . $thumbbasename);
$is_image      = serendipity_isImage($file);

print_r($file);
echo '<br />';
print_r($imgName);
echo '<br />';
print_r($thumbbasename);
echo '<br />';
print_r($thumbName);
echo '<br />';
if ($is_image) {echo 'Is image: True<br />';} else{echo 'Is image: False<br />';}

?>
and make sure all your paths jive. Be sure to set

Code: Select all

$imagenumber = 1;
to the number of an image in the database.

As far as I can tell, the only checks image_selector does in regards to displaying the last page is to verify that $file['imgsrc'] is not a valid path (I'm not sure why it does this, but that is what it seems to do) and it checks if $is_image is true.

$is_image is set using serendipity_isImage, which uses the database to determine mime types.

So I'd make sure that $is_image is true, and that $file['imgsrc'] is not a valid path.

If someone knows more perhaps they would like to comment. :D
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

The Code Matthew posted will help us perfectly further, yes.

I suppose joho's serendipity_images table is missing a column, or his imagemagick/gdlib (which one are you using?) is malfunctioning. In any case, it's not a general bug as it works fine in many other setups.

The other problem with the WYSIWYG in global configuration: This was really confusing, I must admit. It has already been fixed in 0.9 a few weeks ago :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply