Help a simpleton please

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Celebrator
New Member
New Member
Posts: 5
Joined: Mon Aug 28, 2017 9:00 pm

Help a simpleton please

Post by Celebrator »

Hi!

Im a graphic designer that also got the responsibility to update a website. Now i do understand code a bit but the problem is that i dont know where to even look.

Heres the problem.
The website has a calguys calendar to wich events are added. Now these events are shows to which you have to buy tickets and there is a thing where you can add a link to the place where you can buy the tickets.
But instead of using the link provided in the GetTickets textbox it just redirects to "Array" or http://www.racehorsecompany.fi/array a page that does not exist.

http://racehorsecompany.fi/calendar
Here is an example when you click the "get ticket here ->" it just does not work.

Where do i even start to look on how to fix this?
Im sorry im a dummy. Please just point me in the right direction ???

I also added a picture of the problem.
Attachments
Where can i edit this thing?
Where can i edit this thing?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3491
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Help a simpleton please

Post by velden »

There must be some error in the template used to display those events (upcominglist?).

I think it's easy to fix but we'd need to see the relevant part of the template. And please post CMSMS System Information.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Help a simpleton please

Post by paulbaker »

Agree with velden, here is how to get what you need.

For system info, see the link in my signature.

For the upcoming template:
Content > Calguys Calendar > Templates (link top right) > Find the upcoming template (towards the bottom from memory) and paste that between CODE markers in your response here.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Celebrator
New Member
New Member
Posts: 5
Joined: Mon Aug 28, 2017 9:00 pm

Re: Help a simpleton please

Post by Celebrator »

Allright i found "sample template" which i presume is the culprit.

Code: Select all

{* orig fullcalendar view *}
{* This template utilizes fullcalendar (http://fullcalendar.io) an interactive javascript calendar *}
{* this action requires that:
   a: jquery and jquery-ui be enabled in the page header.  You can use jQueryTools, or {cms_jquery} for this.
   b: {cgjs_render} be called in the page header, after the inclusion of jquery and jquery ui.
*}
{cgjs_require cssfile='lib/fullcalendar/fullcalendar.min.css'}
{cgjs_require jsfile='lib/fullcalendar/lib/moment.min.js'}
{cgjs_require jsfile='lib/fullcalendar/fullcalendar.js'}
{cgjs_add nominify=1}
{module_action_url action=ajax_fetchevents forajax=1 asign='fetch_url'}
{$actionid='cntnt01'}
$(document).ready(function(){
  var _holidays = null;
  $.ajax({
     url: '{module_action_url action=ajax_fetchholidays forajax=1}'
  }).done(function(data){
     if( typeof data != 'undefined' && data != null && data.length > 0 ) {
        _holidays = data;
     }

   $('#fullcalendar').fullCalendar({
     dayRender: function( date, cell ) {
       // get holiday events for today.
       if( typeof _holidays == 'string' ) return;
       if( ! _holidays instanceof Array ) return;
       var _tst1 = date.format('YYYY-MM-DD');
       _holidays.forEach(function(entry){
          if( _tst1 == entry.start ) {
             cell.addClass('holiday');
	     cell.css('backgroundColor','{$holiday_bgcolor}').css('color','{$holiday_fgcolor}');
	     cell.html(entry.title);
	  }
       });
     },
     events: {
       url:  '{$fetch_url}',
       type: 'GET',
       data: {
         '{$actionid}showchildren': 1,
	 '{$actionid}detailpage': '{$detailpage}',
	 '{$actionid}eventtemplate': '{$actionparams.eventtemplate|default:''}',
	 '{$actionid}editpage': '{$actionparams.editpage|default:''}',
	 '{$actionid}editeventtemplate': '{$actionparams.editeventtemplate|default:''}',
       },
       error: function() {
         alert('{$mod->Lang('error_fetching_events')|cms_escape}');
       }
     },
     header: {
       left: 'prev,next,today',
       center: 'title',
       right: 'month,agendaWeek,agendaDay'
     },
     defaultEventMinutes: 15,
     slotMinutes: 15,
     allDayText: '{$mod->Lang('allday')|cms_escape}',
     eventColor: '{$dflt_bgcolor}',
     eventTextColor: '{$dflt_fgcolor}',
     monthNames: {$datestrings.monthNames},
     monthNamesShort: {$datestrings.monthNamesShort},
     dayNames: {$datestrings.dayNames},
     dayNamesShort: {$datestrings.dayNamesShort},
     firstDay: {$firstdayofweek},
     columnFormat: {
        month: 'ddd',
        week: 'ddd d/w',
        day: 'dddd d/M'
     },
     buttonText: {
       today: '{$text_today|cms_escape}',
       week: '{$text_week|cms_escape}',
       month: '{$text_month|cms_escape}',
       day: '{$text_day|cms_escape}'
     },
     eventClick: function(event, jsEvent, view) {
       // woot, we can go to a detail view.
       window.location = event.detail_url;
     }
   });

   });
});
{/cgjs_add}

<div id="fullcalendar"></div>
And here's the system information.

Code: Select all

----------------------------------------------

Cms Version: [b]1.12.1[/b]

Installed Modules:

CMSMailer: [b]5.2.14[/b]
FileManager: [b]1.4.5[/b]
MenuManager: [b]1.8.7[/b]
ModuleManager: [b]1.5.8[/b]
News: [b]2.15.2[/b]
Printing: [b]1.1.2[/b]
Search: [b]1.7.13[/b]
ThemeManager: [b]1.1.8[/b]
Gallery: [b]2.3[/b]
CGExtensions: [b]1.53.19[/b]
CGCalendar: [b]1.16.1[/b]
CMSPrinting: [b]1.0.5[/b]
MicroTiny: [b]1.2.9[/b]
CGSimpleSmarty: [b]1.10[/b]

Config Information:

php_memory_limit: [b][/b]
process_whole_template: [b][/b]
max_upload_size: [b]128000000[/b]
url_rewriting: [b]mod_rewrite[/b]
page_extension: [b][/b]
query_var: [b]page[/b]
image_manipulation_prog: [b]GD[/b]
auto_alias_content: [b]true[/b]
locale: [b][/b]
default_encoding: [b]utf-8[/b]
admin_encoding: [b]utf-8[/b]
set_names: [b]true[/b]

Php Information:

phpversion: [b]5.6.31[/b]
md5_function: [b]On[/b] (True)
gd_version: [b]2[/b]
tempnam_function: [b]On[/b] (True)
magic_quotes_runtime: [b]Off[/b] (False)
E_STRICT: [b]2048[/b]
E_DEPRECATED: [b]8192[/b]
memory_limit: [b]192M[/b]
max_execution_time: [b]90[/b]
output_buffering: [b]On[/b]
safe_mode: [b]Off[/b] (False)
file_uploads: [b]On[/b] (True)
post_max_size: [b]8M[/b]
upload_max_filesize: [b]128M[/b]
session_save_path: [b]/var/cpanel/php/sessions/ea-php56[/b] (4733)
session_use_cookies: [b]On[/b] (True)
xml_function: [b]On[/b] (True)
xmlreader_class: [b]On[/b] (True)

Server Information:

Server Api: [b]cgi-fcgi[/b]
Server Db Type: [b]MySQL (mysql)[/b]
Server Db Version: [b]5.6.37[/b]
Server Db Grants: [b]Could not find a suitable "GRANT ALL" permission. This may mean you could have problems installing or removing modules. Or even adding and deleting items, including pages[/b]
Server Time Diff: [b]No filesystem time difference found[/b]

----------------------------------------------

It's a lifesaver to have you guys since i have no idea where to look for these things. I am truly grateful! Also sorry for taking so long!
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: Help a simpleton please

Post by rotezecke »

i have never used this module but i think
{module_action_url action=ajax_fetchevents forajax=1 asign='fetch_url'}
should be
{module_action_url action=ajax_fetchevents forajax=1 assign='fetch_url'}
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3491
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Help a simpleton please

Post by velden »

You posted a 'full calendar' template. This is not the template that is used for the page(s) with the problem.
Celebrator
New Member
New Member
Posts: 5
Joined: Mon Aug 28, 2017 9:00 pm

Re: Help a simpleton please

Post by Celebrator »

I think I found the culprit!

Code: Select all

{cms_stylesheet name="Module: Calendar"}

<div class="cal-list">

{if isset($navigation)}
{if isset($navigation.prev)}<span class="calendar-prev"><a href="{$navigation.prev}">{$lang.prev}</a></span>{/if}    {if isset($navigation.next)}<span class="calendar-next"><a href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}

<table>
{foreach from=$events key=key item=event}

  <tr><td id="date">

    {if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
      {$event.event_date_start|date_format:"%b %d, %Y"}

    {elseif $event.event_date_start|date_format:"%m%Y" == $event.event_date_end|date_format:"%m%Y"}
      {$event.event_date_start|date_format:"%b %d"} - {$event.event_date_end|date_format:"%d, %Y"}

    {elseif $event.event_date_start|date_format:"%Y" == $event.event_date_end|date_format:"%Y"}
      {$event.event_date_start|date_format:"%b %d "} - {$event.event_date_end|date_format:"%b %d, %Y"}

    {else}
      {$event.event_date_start|date_format:"%b %d, %Y"} - {$event.event_date_end|date_format:"%b %d, %Y"}
    {/if}
   </td><td>
  {$event.event_title}
{if $event.fields.GetTickets}<br />
  <a href="{$event.fields.GetTickets}">
  <img src="{uploads_url}/images/calendar/get_tickets_here.png" alt="get tickets here" onmouseover="this.src='{uploads_url}/images/calendar/get_tickets_here_hover.png'" onmouseout="this.src='{uploads_url}/images/calendar/get_tickets_here.png'" /></a>
{/if}
  </td></tr>
{/foreach}
</table>

{if $return_url != ""}
<div class="calendar-returnlink">{$return_url}</div>
{/if}
</div>
Alas I don't know how to fix it :(
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3491
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Help a simpleton please

Post by velden »

Code: Select all

<a href="{$event.fields.GetTickets}">
viewtopic.php?p=334992#p334992

Code: Select all

<a href="{$event.fields.GetTickets.field_value}">
Celebrator
New Member
New Member
Posts: 5
Joined: Mon Aug 28, 2017 9:00 pm

Re: Help a simpleton please

Post by Celebrator »

Hooray!
It works!
Thank you all and lots of love!
Post Reply

Return to “The Lounge”