Problems with JEvents
- dezblanco
- Topic Author
- Offline
- New Member
- Thank you received: 0
Please advise.
Please Log in or Create an account to join the conversation.
- dezblanco
- Topic Author
- Offline
- New Member
- Thank you received: 0
A little more info, the sef at that link, definitely does not work for jEvents 1.5.1
Somewhere in this trek, I had another SEF file that was labled to be for this version of Jevents so I gave it a shot.
Better luck in that it didn't white screen the entire site, but the prior links went to a page that looked like the original page.
Here are some things I got from the debug:
SEF Advance debug information
Array
(
[option] => com_jevents
[Itemid] =>
[task] => month.calendar
[jevtask] => month.calendar
[jevcmd] => month.calendar
)
/index.php?option=com_jevents&Itemid=&task=month.calendar
Parsed in: 3.704 seconds, 16.78 MB
Here is what the non-sef link looks like
www.mysite.com/index.php?option=com_jeve....calendar&Itemid=377
Am I wrong to say it looks like the sef url left out the ItemId?
Below is another error I got when I clicked on one of the category links in the SEF Advance version of the calendar.
Fatal error from one link.
Flat View
See by year Monthly View
See by month Weekly View
See by week Daily View
See Today Categories
See by categories Search
Search
Fatal error: Call to undefined method ExtICalEvent::showEventsByDateNew() in /home/myroot/public_html/components/com_jevents/views/ext/icalevent/tmpl/detail_body.php on line 8
With SEF Advance disabled, the calendars work just fine.
Here is the code from the sef_ext.php file:
<?php
/**
*
* TODO add catids and limit etc properly - refer to cache arguments!!!
*
*/
class sef_jevents {
var $pos = 0;
var $offset = 0;
var $string="";
var $sefstring="";
function set($name,$forcecode=false){
$leader=$forcecode?"$forcecode":"";
if (eregi("&$name=",$this->string)) {
$temp = split("&$name=", $this->string);
$temp = split("&", $temp[1]);
$this->sefstring .= $leader.$temp[0]."/";
return $temp[0];
}
$this->sefstring .= $forcecode?($leader."/"):"";
return "n/a";
}
function get($name,$stripcode=false){
if (isset($this->url_array[$this->pos+$this->offset]) && $this->url_array[$this->pos+$this->offset]!="") {
// .../example/$var1/
$var1 = $this->url_array[$this->pos+$this->offset];
if ($stripcode){
$var1=preg_replace("/$stripcode/","",$var1,1);
}
if (isset($var1) && strlen($var1)>0){
$_GET[$name] = $var1;
$_REQUEST[$name] = $var1;
$this->QUERY_STRING .= "&$name=$var1";
}
else {
$var1 = "n/a";
}
}
else {
$var1 = "n/a";
}
$this->offset++;
return $var1;
}
/**
* Creates the SEF advance URL out of the request
* Input: $string, string, The request URL (index.php?option=com_example&Itemid=$Itemid)
* Output: $sefstring, string, SEF advance URL ($var1/$var2/)
**/
function create ($string) {
// $string == "index.php?option=com_example&Itemid=$Itemid&var1=$var1&var2=$var2"
$this->sefstring = "";
$this->string = $string;
$task = $this->set("task","t");
// add catids at the start with a forced leader
$this->set("catids","c");
switch ($task) {
case "modify":
$this->set("agid");
break;
case "n/a":
return $this->sefstring;
break;
case "view_cat":
$this->set("year");
$this->set("month");
$this->set("day");
$this->set("catid");
$this->set("limit");
$this->set("limitstart");
break;
case "view_year":
$this->set("year");
$this->set("month");
$this->set("day");
$this->set("limit");
$this->set("limitstart");
break;
/*
case 'publish' :
*/
/*
// from a form so not important
case 'cancel':
case 'search':
$this->set("year");
$this->set("month");
$this->set("day");
$this->set("keyword");
$this->set("limit");
$this->set("limitstart");
break;
*/
case 'delete':
$this->set("agid");
$this->set("year");
$this->set("month");
$this->set("day");
break;
case 'view_detail':
$this->set("agid");
$this->set("year");
$this->set("month");
$this->set("day");
$this->set("pop");
break;
case 'add':
case 'admin':
case 'view_search':
case 'view_month':
case 'view_week':
case 'view_day':
case 'view_last':
default:
$this->set("year");
$this->set("month");
$this->set("day");
$this->set("pop"); // only for view_month
break;
}
// $sefstring == "$var1/$var2/"
return $this->sefstring;
}
/**
* Reverts to the query string out of the SEF advance URL
* Input:
* $url_array, array, The SEF advance URL split in arrays
* $pos, int, The position offset for virtual directories (first virtual directory, which is the component name, begins at $pos+1)
* Output: $QUERY_STRING, string, query string (var1=$var1&var2=$var2)
* Note that this will be added to already defined first part (option=com_example&Itemid=$Itemid)
**/
function revert ($url_array, $pos) {
// Examine the SEF advance URL and extract the variables building the query string
$this->QUERY_STRING = "";
$this->pos = $pos;
$this->offset=2;
$this->url_array = $url_array;
$task = $this->get("task","t");
// catids always get a forced strip
$this->get("catids","c");
switch ($task) {
case "n/a":
break;
case "modify":
$this->get("agid");
break;
case "view_cat":
$this->get("year");
$this->get("month");
$this->get("day");
$this->get("catid");
$this->get("limit");
$this->get("limitstart");
break;
case "view_year":
$this->get("year");
$this->get("month");
$this->get("day");
$this->get("limit");
$this->get("limitstart");
break;
/*
case 'publish' :
*/
/*
// from a form so not important
case 'cancel':
case 'search':
$this->get("year");
$this->get("month");
$this->get("day");
$this->get("keyword");
$this->get("limit");
$this->get("limitstart");
break;
*/
case 'delete':
$this->get("agid");
$this->get("year");
$this->get("month");
$this->get("day");
break;
case 'view_detail':
$this->get("agid");
$this->get("year");
$this->get("month");
$this->get("day");
$this->get("pop");
break;
case 'add':
case 'admin':
case 'view_search':
case 'view_week':
case 'view_day':
case 'view_last':
case 'view_month':
default:
$this->get("year");
$this->get("month");
$this->get("day");
$this->get("pop"); // only for view_month
break;
}
return $this->QUERY_STRING;
}
}
?>
Thank you for your assistance.
Please Log in or Create an account to join the conversation.
- Saka
- Offline
- Administrator
Emir Sakic
www.sakic.net
Please Log in or Create an account to join the conversation.
- dezblanco
- Topic Author
- Offline
- New Member
- Thank you received: 0
Please Log in or Create an account to join the conversation.