[imageselectorplus] error when publishing

Creating and modifying plugins.
Post Reply
bernd_d
Regular
Posts: 466
Joined: Thu Jun 03, 2010 9:28 am
Contact:

[imageselectorplus] error when publishing

Post by bernd_d » Wed Jul 23, 2014 9:13 pm

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.

bernd_d
Regular
Posts: 466
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [imageselectorplus] error when publishing

Post by bernd_d » Thu Jul 24, 2014 7:49 am

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 :-(

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [imageselectorplus] error when publishing

Post by Timbalu » Thu Jul 24, 2014 10:49 am

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.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

bernd_d
Regular
Posts: 466
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: [imageselectorplus] error when publishing

Post by bernd_d » Thu Jul 24, 2014 9:10 pm

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.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [imageselectorplus] error when publishing

Post by Timbalu » Fri Jul 25, 2014 12:13 pm

@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.)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [imageselectorplus] error when publishing

Post by garvinhicking » Fri Jul 25, 2014 12:47 pm

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
# 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