Unknown Problem

Hello all,



The last few days, I've started to get the following error appear at tghe top of both my admin and storefront:



Warning: strpos() expects parameter 1 to be string, array given in /home/moonrust/public_html/core/fn.control.php on line 749



Warning: strpos() expects parameter 1 to be string, array given in /home/moonrust/public_html/core/fn.control.php on line 749



Warning: Cannot modify header information - headers already sent by (output started at /home/moonrust/public_html/core/fn.control.php:749) in /home/moonrust/public_html/core/fn.init.php on line 412




Would anyone know what I need to do to correct the error?



Many thanks,



Doddles

Now I'm getting another error…



I'm trying to add some products to a promotion, but I keep getting the following error message:



Fatal error: Cannot use string offset as an array in /home/moonrust/public_html/var/compiled/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 41



I'm getting really worried about this now. Can anyone help?



Thanks,



Doddles

I have now asked CS Cart's technical support for help on this as apparently it's a bug in v. 2.2.4 and they should be able to apply a fix for me.

Please post the solution when you get it. Seems I posted a bug tracker report but of course they say they can't reproduce it…

I have now been told they can't reproduce the problem too… No solution as of yet, but I am still experiencing the problems!

Correction… I can now add products to promotions, but I'm still getting the following error when updating and clearing the cache:



Warning: strpos() expects parameter 1 to be string, array given in /home/moonrust/public_html/core/fn.control.php on line 749



Warning: strpos() expects parameter 1 to be string, array given in /home/moonrust/public_html/core/fn.control.php on line 749



Warning: Cannot modify header information - headers already sent by (output started at /home/moonrust/public_html/core/fn.control.php:749) in /home/moonrust/public_html/core/fn.init.php on line 412




Any ideas…?

Please see the attached Javascript file which caused issues with creating/altering promotions as well as 'locked' blocks so they could not be edited/self-deleted when the block order was altered. I also received the 'mainbox.tpl.php' error you receive when trying to create a new promotion.



CS-Cart provided partial a fix which I integrated with the appropriate file.



Remember to back up the original file, but this fix involves replacing the following file with the attached:


addons/buy_together/js/func.js



Clear your cache, your issue, or at least some of your issue, will be resolved.



Note: This fix is for CS-Cart 2.2.4 Professional.

func.zip

Thanks. I think that's what CS Technical Support did for me, but the other problem still persists.

No joy here. After adding a product to a catalog promo and clicking save, I still get:

Fatal error: Cannot use string offset as an array in /home/ezms/public_html/var/compiled/admin/%%E4^E42^E4252AD1%%mainbox.tpl.php on line 41



The context of that file is:

_tpl_vars['navigation']['dynamic']['actions'] || $this->_tpl_vars['select_languages'] || $this->_tpl_vars['extra_tools']): ?>





It has all the stink of the controller not properly returning from the POSTed data.



Steps I used were;[list=1]

[]create new catalog promotion and click create

[
]Select 'Products' from the selector of types of catalog promotions

[]Click add product

[
]Check a product and click save

[*]Then click Save and this is when the error occurs.

[/list]

Can someone else try these steps and see if they get the same result? I get the same result on my test server.

I am having the exact same problem. I submitted a ticket, I'll keep things updated here.



I also get this error message when I try to create a report tracking individual products.

Make sure you make the change from the code associated with your cart version. The file provided by @stellarbytes is for an older version of cs-cart.



Also, you may need to clear the cache in both your site and your browser after making the change. The change is clearly documented in the bugtracker.

[quote name='tbirnseth' timestamp='1328721565' post='130824']

The file provided by @stellarbytes is for an older version of cs-cart.

[/quote]

As far as I am aware, the fix was produced after the release of 2.2.4 therefore should be good for 2.2.4, however, I was on 2.2.3 at the time.

It didn't match up with what I pulled from the 2.2.4 distribution… Better just to have people change the one line to be changed in whatever version they are on versus providing the whole js file…



In any event, applying the change and flushing both the cart and browser cache seemed to work for me.