Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Custom Columns #2

Closed
digiscape opened this issue Aug 6, 2012 · 10 comments
Closed

Custom Columns #2

digiscape opened this issue Aug 6, 2012 · 10 comments
Assignees
Labels

Comments

@digiscape
Copy link

Using Magento 1.7.0.2 I wanted to add a custom column,
Choosing from any of the custom columns provided shows the following error

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ')' in /home/jason/public_html/magento/app/code/community/BL/CustomGrid/Helper/Collection.php(100) : runtime-created function on line 1

Fatal error: Function name must be a string in /home/jason/public_html/magento/app/code/community/BL/CustomGrid/Model/Custom/Column/Simple/Table.php on line 75

@mage-eag
Copy link
Collaborator

mage-eag commented Aug 9, 2012

I am also using the extension with some custom columns applied on a Magento 1.7.0.2, and didn't encounter yet this problem (as well as for the other versions).
Could you debug the value of $quoteCallback and 'return Mage::helper('customgrid/collection')->callQuoteIdentifierCallback(''.$quoteCallback.'', $i);', found in the given file at line 100, and quote it here ?
There is a problem with the string used for the call to create_function(), but then it could help to determine which part is troublesome.

Thanks,
Benoît

@ghost ghost assigned mage-eag Aug 9, 2012
@digiscape
Copy link
Author

I changed line 100 from

$callCallback = create_function('$i', 'return Mage::helper('customgrid/collection')->callQuoteIdentifierCallback(''.$quoteCallback.'', $i);');

too

$callCallback = create_function('$i', 'return Mage::helper('customgrid/collection')->callQuoteIdentifierCallback($quoteCallback, $i);');

And appears to be working

Another thing I noticed in style.css

button.blcg-customize span { padding-left:20px; background-image:url(images/ico_custom.gif); }
button.blcg-grid-infos span { padding-left:20px; background-image:url(images/ico_infos.gif); }
button.blcg-additional span { padding-left:20px; background-image:url(images/ico_arrow_down.gif); }
button.blcg-export span { padding-left:20px; background-image:url(images/ico_export.gif); }

These all need to have no-repeat added, but does look pretty funky :)

Thank you for providing this add-on its going to add whole lot more flexibility to Magento.

@mystix
Copy link
Contributor

mystix commented Aug 14, 2012

I encountered the same error on Magento 1.4.1.1.

Fix suggested by @digiscape fixed the problem nicely.

@mage-eag
Copy link
Collaborator

mage-eag commented May 6, 2013

First of all, really sorry for the big lateness of my answer... for various reasons it has been months since I did not work on the project. I'll soon drop a word about it on the extension's page I guess, but anyway, I should now be back to business.

Concerning the $quoteCallback problem, the fix by @digiscape prevents the error, but breaks the intended behaviour of the method in the meantime (what's not troublesome at all in almost all cases).
Could someone dump the content of the $quoteCallback variable when the error appears ? It certainly needs to be escaped in some way, but it could help to figure how.

@digiscape
Copy link
Author

$quoteCallback value is: lambda_2

@mage-eag
Copy link
Collaborator

mage-eag commented May 9, 2013

The new 1b94e4c commit changed the way quoteIdentifier() callbacks are handled, does this fix your problem ?

@digiscape
Copy link
Author

No errors, looking good thanks

@mystix
Copy link
Contributor

mystix commented May 17, 2013

Same here -- no errors. Thanks for fixing this!

@mage-eag
Copy link
Collaborator

Cool, thanks for the feedbacks ! :)

@Jeeva-Rathinam
Copy link

what is mean SQLSTATE[42S02]: Base table or view not found: 1146

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants