Page 1 of 1

[serendipity_event_cal] no database entries available

Posted: Tue Nov 24, 2015 7:55 pm
by bernd_d
I have installed an new test-bolg with current s9y 2.0.2 on my uberspace and tried to install this event-plugin.

Installation works fine so far and the plugin works as it should, as you can see in this example...but it is not possible to set up events.

If i try it within backend and "send entry", it jumps to the "view unapproved events"-section and says "There are no events pending to approve!"

If i select "view approved events", it says "There are no events pending !"

If i try to add an event within frontend, i get following message:

Code: Select all

 DB error in eventcal table occurred: 
Access denied for user ''@'localhost' (using password: NO)
SELECT count(id) FROM serendipity_eventcal WHERE approved=0
Database access not possible!
Any ideas?

Re: [serendipity_event_cal] no database entries available

Posted: Fri Nov 27, 2015 12:38 pm
by garvinhicking
Hi!

It seems that the eventcal plugin uses the native mysql_* functions, however you are porably connecting using mysqli?

In that case the plugin would need patching, the call to

Code: Select all

if (mysql_errno()>0) {
should be replaced with something, but I belive checking for a string result:

Code: Select all

if (is_string($result)) {
would not work because in some of the SQL results there would be a valid string return.

Maybe better completely remove that if statement and see if the plugin works? Currently it reports an error where none should have occured...

(I see also the mysql_real_escape_string() function is used without giving the database connection; better use serendipity_db_escape_string() instead). ALso the backup function natively uses MySQL... maybe if Timbalu is reading this, he can weigh in ?)

Regards,
Garvin

Re: [serendipity_event_cal] no database entries available

Posted: Sun Nov 29, 2015 6:45 pm
by bernd_d
garvinhicking wrote: It seems that the eventcal plugin uses the native mysql_* functions, however you are porably connecting using mysqli?
I've set "mysql" within install-wizard, but you are right, the settings are on "mysqli". If i try to set it to "mysql" and save settings, it is set back to "mysqli". :|

I could try to change code as you said, but maybe there is another bug too within settings?!

Update: I've checked my main blog and it is set up to "mysqli" too and it's not possible to change this.


btw: Webspace and Databases are located at uberspace.

Re: [serendipity_event_cal] no database entries available

Posted: Sun Nov 29, 2015 7:20 pm
by Timbalu
bernd_d wrote: .. but maybe there is another bug too within settings?!
Yeah, there definitely is a lot to do and it needs to develop over and over for 2.0+ and PHP +5.4+. Do you really need this? Or is it just to play around? I created this plugin in my early days and it is quite old. And actually I never found anyone really using it... :(

Re: [serendipity_event_cal] no database entries available

Posted: Sun Nov 29, 2015 7:32 pm
by bernd_d
Timbalu wrote:Do you really need this? Or is it just to play around? I created this plugin in my early days and it is quite old. And actually I never found anyone really using it... :(
Another user asked me something about this plugin and i tried to reproduce it. But without a working installation, i'm not able to do.

His initial question was, why serendipity_plugin_eventwrapper doesn't show any events, so i offered to try it on my own server to reproduce it. But meanwhile i'm not sure anymore if eventwrapper really should show "events". :oops:

Re: [serendipity_event_cal] no database entries available

Posted: Sun Nov 29, 2015 7:57 pm
by Timbalu
The plugin serendipity_plugin_eventwrapper has nothing to do with event_cal, which should better be named serendipity_event_eventcal in reality. This last is totally independent (at least I did code it with that in mind) and is an eventcalendar, which has its own table and is not connected to any Serendipity entries, if not done per entry as a link or such.
PS. And I don't know what eventwrapper is about to do... I never found it wrapping any events I ever tried.

Re: [serendipity_event_cal] no database entries available

Posted: Mon Nov 30, 2015 7:48 pm
by Timbalu
I submitted an update for the event calendar plugin. Tomorrow on Spartacus.

Re: [serendipity_event_cal] no database entries available

Posted: Tue Dec 01, 2015 9:02 pm
by bernd_d
Timbalu wrote:I submitted an update for the event calendar plugin. Tomorrow on Spartacus.
Thanks, now i'm able to submit events. 8)

But as it seems, currently it is not possible to show next events in sidebar because the eventwrapper-plugin is not supported and there is no other sidebar-plugin, that uses the ical-database. Right?

Re: [serendipity_event_cal] no database entries available

Posted: Wed Dec 02, 2015 5:20 pm
by Timbalu
Hm, I can see, there are still some things to do if you have 2k11 or similar templates running. I'll try to tweak this and some more I found within the next days, since having a #content #sidebar Golden Ratio of 62/38 % by a width of 1120px would never work and look well with this plugin.

Last question first:
Yes, there is no other plugin using the ical database!
When I wrote this, long ago, I did not make sense to me to have an additional sidebar plugin, since all the magic happens in the calendar table.

The eventwrapper plugin is as old as 8-10 years, I assume. It may (just guessing) have been invented to work as an easy sidebar (plugin) content wrapper, before real sidebar plugins actually were introduced to the plugin magic. It only wraps the generate_content(&$title) method of the plugin api. This is why you only get the title everywhere. In this case we would need to add some faking sidebar output to its caller in event_cal. I assume some "get 3 next db events from now", or such to display. (I personally can not remember to have seen any plugin actually using this as a faked sidebar output.) Edit: Show all events of current month could be done quite easily.

Garvin probably can tell us more details about its presence.

Re: [serendipity_event_cal] no database entries available

Posted: Sat Dec 05, 2015 7:54 pm
by Timbalu
I uploaded a Sinterklaas Edition for tomorrow.
This also adds an option for eventwrapper usage.
Viel SpaƟ!

Re: [serendipity_event_cal] no database entries available

Posted: Sun Dec 06, 2015 12:31 pm
by bernd_d
Made an update today. Looks good, thank you very much! 8)

Re: [serendipity_event_cal] no database entries available

Posted: Mon Dec 07, 2015 7:02 pm
by Timbalu
To put a hat on this, I fixed some more with upcoming v.1.72 & v.1.73.
I think that should be it for a while!

Re: [serendipity_event_cal] no database entries available

Posted: Tue Feb 02, 2016 8:49 pm
by bernd_d
Timbalu wrote:This also adds an option for eventwrapper usage.
I got an question from the user, if it would be possible to show next XX events instead of current month. I understand his wish, because it is not very useful at end of month not to the next pending events.

Could you implement this feature too (or instead of month-view)?

Re: [serendipity_event_cal] no database entries available

Posted: Tue Feb 02, 2016 9:21 pm
by Timbalu
It was an easy to use approach having it like this ... and remember, I only did that by request! ;-)
I see the issue with end of month. But fetching future events here takes a little more work and is woth some pennies. I am not sure I want to spend this....

Re: [serendipity_event_cal] no database entries available

Posted: Tue Feb 02, 2016 9:43 pm
by bernd_d
Timbalu wrote:It was an easy to use approach having it like this ... and remember, I only did that by request! ;-)
I see the issue with end of month. But fetching future events here takes a little more work and pennies. I am not sure I want to spend this....
Thank you for your answer. I understand your point of view not invest time for this, if only one person would use it. I'll give him a short reply to his question.