Loading...
 
Skip to main content

Architecture / Installation


Undefined variable and XML errors on test install

I installed a test system on my Windows box using the InstallEasyPhpAndTiki method w/o any problems. I enabled some additional features to check them out and now I'm running into some errors, mostly when I try to admin links. I'm logged in as the admin but I'm not sure if I'm missing something obvious. The docs are kinda lite on how to configure them or what prerequsites, if any, exist. Can someone please point out my noob errors so I can get back to testing? TIA

Undefined variable error:
Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 454
Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 455
Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 454
Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 455

Seen in:
Workflow > Admin Processes

XML error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
----------------------------
Only one top level element is allowed in an XML document. Error processing resource 'http://localhost/tiki/tiki-edit_articl...
<b>Notice</b>: Undefined variable: categories in <b>No value assigned\tiki\categorize_list.php</b>...

Seen in:
Wiki > Sandbox
Artiles > Edit Article
Forums > Admin forums
FAQs > Admin FAQs, List FAQs
Trackers > Admin Trackers
Admin > Polls

Well, I found out that when I enable Categories I get the XML error. Some progress at least....

Seems to me, after looking at \tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php, the $mid variable is not defined in this function if there is no filter or search criteria. $amid will be empty and on line 451 the count would be 0, leaving $mid undefined. I added an else statement to line 453 and it seems to work. I just don't know if this may cause problems elsewhere in the module.

Any input would be greatly appreciated!


432 function list_processes($offset,$maxRecords,$sort_mode,$find,$filtername=,$filteractive=)
433 {
434 $sort_mode = $this->convert_sortmode($sort_mode);
435 if($find) {
436 $findesc = 'No value assigned';
437 $amid[] = "`name` like ?) or (`description` like ?";
438 $bindvars = array($findesc,$findesc);
439 } else {
440 $amid = array();
441 $bindvars = array();
442 }
443 if ($filtername) {
444 $amid[] = "`name`=?";
445 $bindvars[] = $filtername;
446 }
447 if ($filteractive) {
448 $amid[] = "`isActive`=?";
449 $bindvars[] = $filteractive;
450 }
451 if $amid {
452 $mid = " where ".implode(" and ",$amid);
453 } else {
$mid = "";
}
454 $query = "select * from `".GALAXIA_TABLE_PREFIX."processes` $mid order by $sort_mode";
455 $query_cant = "select count(*) from `".GALAXIA_TABLE_PREFIX."processes` $mid";
456 $result = $this->query($query,$bindvars,$maxRecords,$offset);
457 $cant = $this->getOne($query_cant,$bindvars);
458 $ret = Array();
459 while($res = $result->fetchRow()) {
460 $ret[] = $res;
461 }
462 $retval = Array();
463 $retval%22data%22 = $ret;
464 $retval%22cant%22 = $cant;
465 return $retval;
466 }


I am receiving the same problems. Here is some additional info. When I am not logged in, I can use the Sandbox. When I log in, I cannot. I receive the same XML error as the other poster.

hmmmm....

TIA
Ken - KC7RAD

Ken,
Does the error only exist when you have Categories enabled? I'm not sure what the relationship is between the other items and Categories, but I think it's another bug in that module that no one has found yet.


> Undefined variable error:
> Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 454
> Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 455
> Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 454
> Notice: Undefined variable: mid in No value assigned\tiki\lib\Galaxia\src\ProcessManager\ProcessManager.php on line 455

I'm having the same problem in my newly activated Galaxia module, but not the XML error; I do have Categories active.

It looks to me as though the instances of $mid in lines 454 and 455 are just typos; they're supposed to be $amid.

Rather than trying the else statement, I changed $mid to $amid in those two lines. I'm no longer getting the error, but YMMV. I'm not a PHP coder, and this is my second day using ))TikiWiki(( and my first fifteen minutes using Galaxia, so it's quite possible that I've stopped one place the error can pop up, but not others.

- Ep