Page 1 of 1

0.8 shortcomings.. is this beta?

Posted: Tue May 10, 2005 10:30 pm
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..

Re: 0.8 shortcomings.. is this beta?

Posted: Tue May 10, 2005 10:39 pm
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.

Posted: Tue May 10, 2005 11:23 pm
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.

Posted: Tue May 10, 2005 11:29 pm
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.

Posted: Tue May 10, 2005 11:52 pm
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)?

Posted: Wed May 11, 2005 12:22 am
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..

Posted: Wed May 11, 2005 1:48 am
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

Posted: Wed May 11, 2005 10:44 am
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