Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default v153 $languages is it no more?

    I have installed a fresh version of ZC 1.5.3. using the default products. (Did not require a database upgrade as I am trying to verify functionality of some code previously written.)

    Alongside, I have added files that do not require any type of a merge with existing code, but do interface with the database requiring the addition of menu options in the admin panel.

    I had previously used this code on ZC 1.5.0 and 1.5.1. Long and short of it is this, the code includes application_top to bring in and initialize ZC default information and then continues through operation written into the page being displayed (combinations of php and html code) until the bottom where application_bottom is included.

    As part of this code, I include another file that has functions that reference the global variable $languages; however, it appears that $languages is not defined (at this point) when I am using ZC 1.5.3. I haven't gone back to test the same code against the previous versions; however, and as many posters will state, I know that it used to work with either of those versions. I was able to overcome the issue by placing:
    Code:
    $languages = zen_get_languages();
    before the include of the other file; however, I am trying to find from anyone else in the know if there in fact has been a change in the initialization of the code so that I may in the future need to consider the existence of the variable $languages or is it just that I have misremembered something?

    I did try to do a search for cases where $languages was assigned and found a few, but many more instances of it being used in some regards... At the time, the number of occurrences was a bit over whelming, but I was glad to stumble across the zen function to assign it. I know there is a new plugin that will allow the admin panel to have a different language than the default store language, etc... and I know there have been some other gross changes, but thought I would share my "trouble" with someone else, and maybe further some programmer's knowledge.
    Last edited by mc12345678; 22 Jul 2014 at 05:05 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: v153 $languages is it no more?

    That exact phrase shows up 81 times in the 1.5.3 clean install.
    Perhaps something happening in youradmin/includes/functions/general.php around line 632 where the function takes place.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: v153 $languages is it no more?

    Quote Originally Posted by dbltoe View Post
    That exact phrase shows up 81 times in the 1.5.3 clean install.
    Perhaps something happening in youradmin/includes/functions/general.php around line 632 where the function takes place.
    So I agree that $languages is included in the default/fresh install, but it doesn't appear to be a variable that is instantiated when application_top is loaded. When I had tested with:
    Code:
    print(sizeof($languages));
    Or
    Code:
    print_r($languges[0]);
    Both indicted that there was nothing present.

    But after calling zen_get_languages() both functions worked.

    I confirmed through super_globals on a 1.5.1 system that during these operations the variable $languages was indeed set, will try the updated version of the same program to see if it is present at the same point (without my call to the get statement).

    Perhaps my title was a little misleading, but at the same time seemed appropriate/applicable.
    Last edited by mc12345678; 22 Jul 2014 at 06:51 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: v153 $languages is it no more?

    Interesting.
    I don't see anything different between 1.5.1 and 1.5.3 in that they show the require for general.php on line 28 of youradmin/includes/init_includes/init_general_func.php
    Don't have a 1.5.2 test site but, it does show a change to the above file in 1.5.2.
    Will take better look this evening. Perhaps a require in the mod that fired it?

  5. #5
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: v153 $languages is it no more?

    Quote Originally Posted by dbltoe View Post
    Interesting.
    I don't see anything different between 1.5.1 and 1.5.3 in that they show the require for general.php on line 28 of youradmin/includes/init_includes/init_general_func.php
    Don't have a 1.5.2 test site but, it does show a change to the above file in 1.5.2.
    Will take better look this evening. Perhaps a require in the mod that fired it?
    Any results? At leastany worth reporting? :)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,151
    Plugin Contributions
    11

    Default Re: v153 $languages is it no more?

    Sorry, Nothing yet. Still dealing with PHP strict error reporting on other sites.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: v153 $languages is it no more?

    I'm not aware of any explicit changes that would cause the symptoms you're talking about.

    Are you 1000% certain that you didn't have something customized to load $languages yourself?

    It is indeed not loaded in application_top ... and never has been. But many (not all) admin pages do directly set it ... so maybe your custom code is finding it on certain pages but not on others.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #8
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: v153 $languages is it no more?

    So, the code in question is EasyPopulate version 4. I may as said have installed something to what seems to be a vanilla store that assigned $languages before the code, but I also thought I tried the code on a 1.5.1 and 1.5.3 site, and when I tested for $languages within easypopulate_4.php after loading the ZC code, but just before including the export/import code. On 1.5.3 $languages does not contain anything, but in 1.5.1 it did... Discovered during efforts to review other functionality across versions.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. two or more languages
    By aleica00 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 26 Dec 2011, 11:21 PM
  2. Adding more languages
    By uniqueliving in forum General Questions
    Replies: 13
    Last Post: 4 Jun 2010, 08:30 AM
  3. Configuration/Submenus in more languages.
    By Loter in forum Addon Language Packs
    Replies: 0
    Last Post: 12 Mar 2010, 09:56 AM
  4. Logoff bug???? If 2 more languages
    By amopro in forum Bug Reports
    Replies: 0
    Last Post: 11 Jul 2007, 07:26 PM
  5. More Languages??
    By bsandland in forum General Questions
    Replies: 1
    Last Post: 19 Apr 2007, 07:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR