Page 1 of 1

[imageselectorplus] error when publishing

Posted: Wed Jul 23, 2014 9:13 pm
by bernd_d
With current version 0.40 i get an error when i publish an article (just saving the draft seems to work).

Code: Select all

Fatal error: Call to a member function assign() on a non-object in .../plugins/serendipity_event_imageselectorplus/serendipity_event_imageselectorplus.php on line 968
No other output, where usually is all this ping-pong-code.

I just used following code within my entry:

Code: Select all

<mediainsert><gallery name="2014/07/23_Elefantenanlage/" /><media type="gallery" /></mediainsert>
Entry is still published, as you can see here.

Re: [imageselectorplus] error when publishing

Posted: Thu Jul 24, 2014 7:49 am
by bernd_d
I've seen another bug when using the gallery...

Thumbs are included, but links to the large images are broken, the blog-url is missing. They are like https://uploads/2014/07/23_Elefantenanlage/DSC_9227.jpg instead of https://bernd.distler.ws/uploads/2014/0 ... C_9227.jpg :-(

Re: [imageselectorplus] error when publishing

Posted: Thu Jul 24, 2014 10:49 am
by Timbalu
This seems to be a bug of the plugins fallback plugin_mediainsert.tpl file. Thanks!

Line 7 should be (removed the slash in {$serendipityHTTPPath}/uploads)

Code: Select all

<a class="serendipity_image_link" href="{$serendipityHTTPPath}uploads/{$medium.path}{$medium.realname}">
The other problem is that your Smarty object (and its vars like {$serendipityHTTPPath}) isn't instanciated yet. Did you change some plugin order in the backend or anything that could make that happen?
I just tested my local 0.40 with a new mediainsert gallery and all is well with 0.40, which last changes did work on other parts.

Edit: Oh I just saw you are using the 2.0 beta already.
2 things to take care about:
Is it a current github snapshot?
Do you use the core ckeditor? This does not have (and I am not sure it will ever have) all the modifications the plugin has, for handling certain S9y things like the mediainsert insert.

I already committed the change and also added some is_object(smarty) checks.

Re: [imageselectorplus] error when publishing

Posted: Thu Jul 24, 2014 9:10 pm
by bernd_d
Timbalu wrote:This seems to be a bug of the plugins fallback plugin_mediainsert.tpl file. Thanks!

Line 7 should be (removed the slash in {$serendipityHTTPPath}/uploads)

Code: Select all

<a class="serendipity_image_link" href="{$serendipityHTTPPath}uploads/{$medium.path}{$medium.realname}">
The other problem is that your Smarty object (and its vars like {$serendipityHTTPPath}) isn't instanciated yet. Did you change some plugin order in the backend or anything that could make that happen?
I don't know if the problem came up with the last plugin-updates. I just mentioned about this problem because i used the gallery-function again after a few month... :)
Timbalu wrote:I just tested my local 0.40 with a new mediainsert gallery and all is well with 0.40, which last changes did work on other parts.
I included your commit into my files and it seems to work. Thanks!
Timbalu wrote:Edit: Oh I just saw you are using the 2.0 beta already.
2 things to take care about:
Is it a current github snapshot?
Maybe it is Beta3. ;) Before it was something from last week.
Timbalu wrote:Do you use the core ckeditor? This does not have (and I am not sure it will ever have) all the modifications the plugin has, for handling certain S9y things like the mediainsert insert.
No, i don't use WYSIWYG. I just use plain-text with textile-markup.

Re: [imageselectorplus] error when publishing

Posted: Fri Jul 25, 2014 12:13 pm
by Timbalu
@Garvin

While checking up the update, I noticed a bunch of files in my database image table, with no extension in realname. These files I previously (see above) used as a mediainsert test gallery and now wondered, why they did not properly link to fullimage (which is build by $realname).
As they were all uploaded nearly the same time and date, and I did not remember how I had managed them to upload to the testblog, I tested the zip function maybe missing the ext for realname, but all OK, I also tested the manual drop in to ML, all OK.

Are there other chances where this could be a bug somewhere?
(It could also be a local misbehave of the imageMagick handler, which I had from time to time.)

Re: [imageselectorplus] error when publishing

Posted: Fri Jul 25, 2014 12:47 pm
by garvinhicking
Hm, no idea. We'd need to reproduce this somehow to see at which point they get added. Maybe it'S the rebuild thumbnail option, or maybe the automatic mdb sync?

Regards,
Garvin