Textpattern CMS support forum

You are not logged in. Register | Login | Help

#871 2015-09-16 20:46:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Manaus wrote #294917:

I can’t manage to print anything in my little cells, here is the code

There’s nothing wrong with your code, so it’ll be some configuration thing that’s tripping it up. Here’s a quick checklist. Apologies if you tried some or all of them already:

  • Is your calendar tag in a Form? No problem if so. But if it’s in an article, remember to escape Textile around the tag, or turn off Textile processing altogether for that article.
  • Are there Live articles in section “appuntamenti”?
  • Do those articles have valid Posted dates in the format YYYY-MM-DD in custom_1?
  • Do the articles have an Expiry set which might occur before the Posted date?

If it’s not any of those then please can you supply some more info, maybe some of the detail from your article(s) in that section — such as the values in custom_1 — so I might be able to help you figure out what’s going on.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#872 2015-09-17 09:10:29

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 244
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Thanks Bloke,

  • No it’s in a page
  • Yes there are, but the vast majority is basic
  • I’m using glz_custom_fields 1.4.0beta, the field is a date picker called Data_evento (printing the content with txp:custom_field returns a regular Posted data format)
  • Expiry date: few of them

Offline

#873 2015-09-17 09:44:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Manaus wrote #294929:

the field is a date picker called Data_evento

My money’s on this being the problem. smd_calendar uses a PHP function to parse the dates. If for some reason it cannot understand the date it drops back to using the article’s Posted date (you might like to scroll the calendar to the article’s Posted date and see if the cell contents is appearing there instead).

Unfortunately the PHP function only parses English dates so if the format isn’t one it expects, it has a tantrum. Perhaps it isn’t figuring out the date format properly? Can you try temporarily disabling glz_cf and manually enter a date in the format I gave above, then see if your content appears on that date? Or edit the field contents in PHPMyAdmin?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#874 2015-09-17 10:23:37

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 244
Website

Re: smd_calendar: complete schedule / event / calendar / diary

Thanks Bloke
Your suggestion of exploring mysql was successful, the needed custom field was shifted for some reason to custom_6. Yay!

Offline

#875 2016-06-21 19:44:03

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 28

Re: smd_calendar: complete schedule / event / calendar / diary

I have finished pages of the Czech kindergarten “with a little help” of excellent plugin smd_calendar. Everything works fine, but one behavior is strange. If I enter a one-day event for the first day of the month, no event on this day arise. If I write a one-day event for any other day of the month, everything is fine…
Does anyone have an explanation, or the same experience? Thanks in advance for your help.

Offline

#876 2016-06-21 21:42:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_calendar: complete schedule / event / calendar / diary

mikulas wrote #299916:

If I enter a one-day event for the first day of the month, no event on this day arise. If I write a one-day event for any other day of the month, everything is fine

Very strange indeed. I tested this on my installation and it worked fine so something else must be at play here. We’re going to have to dive a bit deeper so I can see if I can replicate the problem.

Please would you furnish me with some info, a lot of which you can clip from your High Diagnostics:

  • PHP version.
  • Plugin version.
  • Your locale (timezone) as set in Admin->Preferences.
  • Whether your web host is in the same timezone as your locale is set (probably, but I’m just being curious).
  • The attributes you use for your smd_calendar / smd_article_event tag(s).
  • The contents of any relevant Forms that you use to populate calendar cells.
  • List of other public-side plugins you use.
  • How your event is set up:
    • Using a Posted datestamp or a custom field?
    • Does the event have an expiry?
    • If so, how is it defined? Expires datestamp or custom field?
    • Any other custom fields in use?

Thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#877 2016-06-22 10:17:21

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 28

Re: smd_calendar: complete schedule / event / calendar / diary

Bloke wrote #299917:

Please would you furnish me with some info, a lot of which you can clip from your High Diagnostics:

  • Textpattern version: 4.5.7 (r5900)
  • PHP version: 5.3.29
  • Plugin version: smd_calendar-0.53
  • Server TZ: Europe/Prague
  • Server Local Time: 2016-06-22 10:31:01
  • DST enabled?: 1
  • Automatically adjust DST setting?: 1
  • Time Zone: Europe/Prague (3600)
  • MySQL: 5.0.51a-24+lenny5
  • Locale: cs_CZ.UTF-8
  • Server OS: Linux 2.6.26-2-amd64
  • Active plugins: smd_calendar-0.53, pap_contact_cleaner-0.1m, zem_contact_reborn-4.5.0.0m, smd_gallery-0.62, glx_image_count-0.2, adi_mobile-0.2, kuo_tinymce_mb_cz-0.2m, upm_image-0.6.2, etc_date-0.3, esq_adminsplash-1.01m, ebl-image-edit-2.2, rvm_css-1.0, boy_enduser_docs-0.6_mbm, adi_file_tab-0.1, jmd_sitemap-0.1.2, smd_lib-0.36, soo_plugin_pref-0.2.2, bot_write_tab_customize-0.7.2, wet_peex-1.0, smd_browse_by-0.10m, jbx_multiple_image_upload-0.4m, rah_status_dropdown-0.4, bot_admin_tooltips-0.4m, wet_quickopen-1.1, bot_privs-0.3.2m, adi_article_tab-0.1, msd_admin_datepicker-0.7

My calendar tag with atributes:

<txp:smd_calendar section="nastenka,kalendar,logopedie" expired="1" monthformat="{Leden,Únor,Březen,Duben,Květen,Červen,Červenec,Srpen,Září,Říjen,Listopad,Prosinec}" dayformat="{Ne,Po,Út,St,Čt,Pá,So}" firstday="1" navarrow="0" select="month" datefields="custom_1,custom_6" stepfield="custom_7" showskipped="0" showspanned="1" cellform="kalendar-obsah-bunky" spanform="kalendar-span" yearwidth="1,1" eventwraptag="dd" classlevels="cell,event" />

cellform (kalendar-obsah-bunky):

<txp:smd_if_cal flag="event">
<ul>
<li><h4>{day}</h4>
<dl><dt>Události dne <span style="color:red;"><txp:smd_cal_info type="day" />.<txp:smd_cal_info type="month" />.</span></dt>
{events}</dl>
</li>
</ul>
<txp:else />
<h4>{day}</h4>
</txp:smd_if_cal>

spanform (kalendar-span):

<txp:permlink><txp:title /></txp:permlink>

How your event is set up:

  1. Using a Posted datestamp or a custom field?
  2. Does the event have an expiry?
  3. If so, how is it defined? Posted datestamp or custom field?
  4. Any other custom fields in use?

  1. For a posted date I use custom field.
  2. Does the event have an expiry? – yes
  3. If so, how is it defined?
    1. One-day event using fieldset write-expires with the same date as event set and evening hour.
    2. Multi-day event using custom field custom_6 and article expiration is set using fieldset write-expires.
    3. custom fields for calendar uses datepicker with format yy-mm-dd (e.g. 2016-06-22)
  4. For recuring events is stepfield custom_7.

Last edited by mikulas (2016-06-27 06:18:26)

Offline

#878 2016-07-02 09:21:54

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 28

Re: smd_calendar: complete schedule / event / calendar / diary

Hm, when I delete the atributte datefields from smd_calendar tag and for setting of event day I use the posted timestamp, everything is OK even with the first day of month. (But in this case I’ll have to rewrite all calendar events …)

Offline

#879 2016-07-02 14:48:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,622
Website

Re: smd_calendar: complete schedule / event / calendar / diary

mikulas wrote #300126:

when I delete the atributte datefields from smd_calendar tag and for setting of event day I use the posted timestamp, everything is OK even with the first day of month.

OK, thanks for testing and for the detailed info about your environment, and sorry I haven’t got back to you in the meantime. Been sidetracked.

Interesting that it works for regular posted/expiry dates but not the extended custom-field based posted/expiry dates. That gives me something to check. They’re supposed to behave the same way, but maybe there’s some circumstances — like first day of the month — under which they don’t. I’ll do some debugging.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#880 2016-09-14 18:45:31

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,202
Website

Re: smd_calendar: complete schedule / event / calendar / diary

for some reason I’m getting this error from a vanilla smd_calendar call.

Textpattern Error: Unknown column 'NULLDATETIME' in 'having clause' while parsing form None on page events

[EDIT] Did some snooping… “setting the pref “publish expired articles” to “yes” solved the issue.

Offline

Board footer

Powered by FluxBB