how to calculate the values?

Status
Not open for further replies.
I have test in local and this the error (please, see the images in attach)
in frontend
1 - The table don't apply the filter but error pagenav is correct now (image filter_table_no.jpg)
2 - Don't connect to form link (images no_connection.jpg)
3 - In this situation it's impossible for me test the calculate values to form

in backend
1 - connection to database is correct to admin but in frontend this don't work
2 - when I open one of the tables don't work admin template (image backend_table.jpg) and display this error
Notice: Use of undefined constant _RIGHT_JOIN - assumed '_RIGHT_JOIN' in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\admin.fabrik.html.php on line 136

In all images I have evidence in red the part of problem.

Now I restore files of fabrik. This are files to 1.04 SVN 48 (I fink) of Joaquin, there the filter table work correct.
thanks
 

Attachments

  • filter_table_no.jpg
    filter_table_no.jpg
    69.9 KB · Views: 211
  • filter_table_no.jpg_thumb
    20.8 KB · Views: 231
  • no_connection.jpg
    no_connection.jpg
    34.9 KB · Views: 214
  • no_connection.jpg_thumb
    7.4 KB · Views: 224
  • filter_table_yes.jpg_thumb
    14 KB · Views: 193
  • filter_table_yes.jpg
    filter_table_yes.jpg
    36.4 KB · Views: 214
  • backend_table.jpg_thumb
    12.6 KB · Views: 240
  • backend_table.jpg
    backend_table.jpg
    97.6 KB · Views: 214
hi Alan

I cant see the issues as you've reverted the site back to a previous version of fabrik.
Is there anywhere you can duplicate the problem (on a development server for example) so we can take a look?

The only thing I can guess at is the error "Notice: Use of undefined constant _RIGHT_JOIN " - is this because you are using an italiene language file for fabrik. If so you will need to edit

administrator/components/com_fabrilk/languages/{mylanguage}

and add at the bottom of the file:

Code:
define("_RIGHT_JOIN", "right join");
 
Hi Rob,
the _RIGHT_JOIN now is ok but for me it's impossible working on the server with this version of fabrik because have much error.
I'm confused, there is error to admin mode:
Fatal error: Call to undefined function: htmlspecialchars_decode() in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\views\table\tmpl\default.php on line 1065
and then I exclude this line

and in frontend now work the pag nav but in the table the filter dont't work and the template in use is changed with the default

There is a new version SVN of fabrik?
alan
 
Hi Alan

This has been fixed in the SVN, a snap shot patch is available in the downloads section for you

Cheers
Rob
 
Hi Rob, thanks for your replay!

I have overwrite the files with upgrade and have add in the italian language the code "define("_RIGHT_JOIN", "right join");" and it's ok.

but I have two questions:
first
my old template (do you remember news.html where I link row of to other component?) where now I placed? and more, now the extension of the templates is .php and don't .html?
I don't find the directory "tmpl" but only "views" in the /components/com_fabrik and I have copy the old directory "tmpl".

second
in this new situation it loses the connections of the old filters when read table in frontend and it's impossible in the administrator mode add new filter.
This the error display in admin mode:
Notice: Use of undefined constant _LINK_TO_TABLE - assumed '_LINK_TO_TABLE' in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\views\table\tmpl\default.php on line 990
_LINK_TO_TABLE

Notice: Use of undefined constant _LINK_TO_FORM - assumed '_LINK_TO_FORM' in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\views\table\tmpl\default.php on line 991
_LINK_TO_FORM

I much confused
alan
 
Hi Alan

We no longer use patTemplate for the templates because
1) No one under stood how they worked (including me half the time!)
2) We are implementing the same templating system that will be in Joomla1.5, the change in the location of the templates was also motivated by my wish to locate the templates in the same place as Joomla 1.5 places its templates.


So that being said, table templates have been moved to
/components/com_fabrik/views/table/tmpl/{templatename}/

Form templates have been moved to
/components/com_fabrik/views/form/tmpl/{templatename}/

Replace {templatename} with the name of the template. Inside the {templatename} folder you need at least one file - template.php.


again these are missing translations , add this to your language file:

Code:
define("_LINK_TO_TABLE", "link to table");
define("_LINK_TO_FORM", "link to form");
 
Hi Rob, are all much complicated for me.
I return on my (stable) online version of Fabrik (SVN files of Joaquin).
I need only correct page nav and total value of calcule in the form!!!

In this version I have much error. I have insert in the italian language the "define" but are other error:
1 - to admin edit form
Notice: Use of undefined constant _DEFAULT - assumed '_DEFAULT' in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\admin.fabrik.forms.php on line 175

Notice: Use of undefined constant _EMAIL_TEMPLATE - assumed '_EMAIL_TEMPLATE' in c:\programmi\easyphp1-8\www\dnn\administrator\components\com_fabrik\views\form\tmpl\default.php on line 463
_EMAIL_TEMPLATE

2 - to admin edit table don't apply the filter (previous it's loses and when I select "add filter" nothing happens)
3 - I don't working on the new template mode because I have this code to link the row of table to component Alberghi in my costum template:
Code:
<table width="100%" border="0" cellpadding="5" cellspacing="0" class="mfDataTable" style="width:100%;border:1px solid #000000;">
			<tr style="background-color:#FFCC00;font-weight:bold;">
			<th align="left">Nome Struttura</th>
			<th align="left">Comune</th>
			<th align="left">Provincia</th>
			<th align="left">Regione</th>
			<th align="left"><div align="center">-</div></th>
			</tr>
				<mos:tmpl name="named-rows">
					<tr>
				   <td style="font-weight:bold; border-bottom-color: 1; border-color: #000000;"><mos:var name="jos_alberghi.title" /></td>
						 <td><mos:var name="jos_alberghi.comune" /></td>
						 <td><mos:var name="jos_alberghi.provincia" /></td>
						 <td><mos:var name="jos_alberghi.regione" /></td>
					   <td><div align="center"><a target="_blank" href="/dnn/component/option,com_alberghi/task,detail/Itemid,/id,<mos:var name="jos_alberghi.id" />">scheda</a></div></td>
					</tr>
				</mos:tmpl>
		 </table>
I have duplicate the folder "template" default and renamed "news" but my code where I do place?

4 - in frontend don't work the filter table (it's display ok but don't work)
5 - in frontend don't work the page nav (it's display ok but don't work)

repeat my first post, I need only correct page nav and calculate value in the form, it's possible in my SVN version?
alan
 
Hi Alan

1) Each time you get these errors they can be fixed by adding in the lines:

define("_CONSTANT", "translation");

it would be great if you could post your translations back here as well ;)

3) You cant use the 1.0.4 code with the old template, you need to convert it to the php equivalent. In your "news" folder create a file called "template.php" add this to it:

Code:
<?php /**
 * @package fabrik
 * @version 1.0.4
 * @Copyright (C) Rob Clayburn
 * @license GNU/GPL [url]http://www.gnu.org/copyleft/gpl.html[/url]
 */
/* MOS Intruder Alerts */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
?>
<h1><?php echo $this->table->label;?></h1>
<?php echo $this->table->intro;?>
<form action="<?php echo $this->table->action;?>" method="post" id="fabrikTableForm" name="fabrikTable">
<?php if($this->showAdd){?>
	<span class="pagenav">
		<a href="<?php echo $this->addRecordLink;?>">Add Listing</a>
	</span>
<?php }?>
<?php if($this->showCSV){?>
	<span class="pagenav">
		<a href="<?php echo $this->csvLink;?>">Export to CVS</a>
	</span>
<?php }?> 
<?php if($this->showRSS){?>
	<span class="pagenav">
		<a href="<?php echo $this->rsslink;?>">Subscribe RSS</a>
	</span>
<?php }?>
<?php if($this->showFilters){?>
<table class="filtertable">
	<tr>
		<th colspan="2" style="text-align:left">Search:</th>
	</tr>
	<?php foreach($this->filters as $filter){?>
	<tr>
		<td><?php echo $filter->label;?></td>
		<td style="text-align:right;"><?php echo $filter->element;?></td>
	</tr>
	<?php } ?>
	<?php if($this->filter_action != 'onchange') {?>
	<tr>
		<td colspan="2" style="text-align:right;"><input type="button"
			onclick="submitfabrikTable('filter')" class="button" value="Go"
			name="filter" /></td>
	</tr>
	<?php }?>
</table>
	<?php }?> <br style="clear:both;" />
<br />
	<?php if(count($this->rows) == 0){?>
		<div class="emptyDataMessage"><?php echo $this->emptyDataMessage;?></div>
	<?php }else{
		foreach($this->rows as $group){?>
<table class="fabrikTable" width="100%" border="0" cellpadding="5" cellspacing="0" style="width:100%;border:1px solid #000000;">
	<tr style="background-color:#FFCC00;font-weight:bold;">
	   <th align="left">Nome Struttura</th>
			<th align="left">Comune</th>
			<th align="left">Provincia</th>
			<th align="left">Regione</th>
			<th align="left"><div align="center">-</div></th>
		</tr>
	<?php

	foreach($group as $row){
		?>
		<tr>
			<td style="font-weight:bold; border-bottom-color: 1; border-color: #000000;"><?php echo $row->jos_alberghi___title;?></td>
			<td><?php echo $row->jos_alberghi___comune;?></td>
			<td><?php echo $row->jos_alberghi___provincia;?></td>
			<td><?php echo $row->jos_alberghi___regione" /></td>
			<td><div align="center"><a target="_blank" href="/dnn/component/option,com_alberghi/task,detail/Itemid,/id,<?php echo $row->jos_alberghi___id ;?>">scheda</a></div></td>
		</tr>

	
	<?php 
}
}?>
</table>
<?php }
print_r($this->hiddenFields);?>
<?php echo $this->nav;
echo $this->deleteButton;
?>
</form>
</script>

For me the page nav works fine, what errors do you get?

Cheers
Rob
 
Hi Rob, I have tested.

I work in local with files patch (last available in the downloads section) and the template thanks your code now is display but the filter of the table, the pagenav and the display number row don't work (see the attach image).

I have one error in frontend:
Notice: Undefined offset: 1 in c:\programmi\easyphp1-8\www\dnn\components\com_fabrik\fabrik_table.class.php on line 1570

In the admin mode on the table the filter are lose and it's impossible setting because when I select "add filter" this don't work.
alan
 

Attachments

  • new_template.jpg_thumb
    16.8 KB · Views: 183
  • new_template.jpg
    new_template.jpg
    104.1 KB · Views: 266
Hi Alan

Have you tried editing and resaving your table? That might get rid of the Notice error.

For admin - what browser are you using? I think there was an issue with IE that I have fixed since I made the download, so perhaps try using Firefox.

Rob
 
Hi Rob,
I use only firefox (last version) but I have test with ie and it's same.
In the admin mode it's impossible to setting and apply new filter on the table (link don't work)

please read this post, it's last test of all my problem
http://fabrikar.com/index.php?option=com_smf&Itemid=9&topic=1118.msg4688#msg4688
In local I use the last SVN version of fabrik (of section download this site) and the problem are much (don't work filtertable, pagenav, admin table setting, lose link to template, lose link to database when the connection to database it's ok ... see my attach images)
In online site I use the SVN 36 (I fink). This are overwrite with Joaquin's files (in this version filtertable work ok but don't work pagenav and calculation form)

I don't no what do.
thanks
alan
 
install firebug (http://www.getfirebug.com) for firefox
Then report the javascript error you get

Also if you can provide a page we can look at that might help
For the test page, ensure that you are using the latest version from the svn
 
Ok Rob,
I use the last version of SVN (of section download in your site) in local

I have install firebugs and when I go to one link of the table there is one error in the page at line 877
unterminated string literal
[Break on this error] 'value': '<br />\n

when I show all code in the line 877 there is this
Code:
if( addFirst ){
876 this.addFilterOption( );
877 }
878 var heading = new Element('h3', {}).appendText(label);
879 heading.injectTop(this.el);

In other link table there are two error (the table are same)
unterminated string literal
[Break on this error] 'value': '<br />\n
index.php (line 939)
$("checkAll").addEvent is not a function
[Break on this error] </div>
index.php (line 1725)

and the code of first errore is
Code:
 if( addFirst ){
938 this.addFilterOption( );
939 }
940 var heading = new Element('h3', {}).appendText(label);
941 heading.injectTop(this.el);

and second error is
Code:
 var event = new Event(e);
1720 event.stop();
1721 });
1722</script>
src="[url]http://127.0.0.1/dnn/images/banners/italy2_120.jpg"[/url] style="border:0px solid green" vspace="0" alt="Beststayinitaly" title="Beststayinitaly" width="120" height="86" /></a></td></tr></table> </div>
1725 </div>
1726 </td>
1728 </table>
Code:
this error is code of template

In online site I use SVN 36 and this is the error of line 7 to index.php
Lightbox.init.bind is not a function
[Break on this error] eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a...
and the code of this error is
I have fix this error thnks to Rob for Firebug (very good tester). In the header of template I don't use the open navigation whit slimbox.js of the default version of rocketheme (this option don't run in i.e) but this don't resolve the other problems

when I go to link of table dont't show other error but only this at the line 7 and the pagnav, number of row display don't work
when I fil the form where is the calculation value don't show other error but only this at the line 7 and the receipt it's sending but the calculation don't run
alan
 
when I fill the form where is the calculation value don't show other error and the receipt it's sending but the calculation don't run

In attach image the test of the form with firebugs and the row with drop down value of my calculation are:
Quota associativa
Struttura 1
Struttura 2
Struttura 3
total1 is hidden element with calcule (it's correct the script?)

Other image attach have the test of the table (where pagenav and number row display don't work (this all in online product site)
Thanks, alan
 

Attachments

  • firebug_test_table.jpg
    firebug_test_table.jpg
    80.9 KB · Views: 204
  • firebug_test_form.jpg_thumb
    9.5 KB · Views: 200
  • firebug_test_form.jpg
    firebug_test_form.jpg
    91 KB · Views: 217
  • firebug_test_table.jpg_thumb
    8.4 KB · Views: 190
:-[
Please see my other message regarding updating from the svn
I have tried, all too much difficult for me, I am forced to renounce.
It's wrong situation!

When will new stable version of fabrik?

For me my online SVN is last stable version of Fabrik where there are little mistakes.
The tables are display correctly with my personal template new2 except the pagenav and the row display show, the filtertable work and the form work except for the function of calculation (one form on seven) ... other I don't no ... but it is impossible the support to correct these little mistakes

alan
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top