Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,571
    Plugin Contributions
    30

    Default Finding duplicated constants

    While nit-picking with Report All Errors, notices for duplicated constants keep cropping up.

    Surely by now someone has made a utility script to read the main language file and then scan the others for duplicates....?

    I say that in addition to "surely everyone"
    - develops on the most recent version of php to get an early warning heads-up
    - has STRICT enabled
    - uses Report All Errors and a HTML validator before submitting a PR
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Finding duplicated constants

    No, and stop calling me Shirley.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

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

    Default Re: Finding duplicated constants

    Thing is, that unless referring to duplication of a constant within a single file, that so long as Zen Cart continues to use constants for language values (without checking for previous definition) along with the template override system then the existence of duplicate constants is likely to occur.

    I believe that this is one reason that a future version of Zen Cart is to use a variable array to contain definitions. Unfortunately assignment of language values in that arrangement requires a reverse assignment of values by first populating the "base" language's definitions, followed by an alternate language's override(s), then a specific file's override with whatever intermediate file overrides are to be considered. The current override is expected to load the current file's definitions before loading the base language.

    Both have their "issues" and there would need to be some determined scheme about how to fully handle the overrides as say a core file may have a definition that is desired but is then overridden in a file's override that then has to be overridden again in a language/template override to return back to the original version. Whatever it ends up being, I'm sure there will be an update in guidance either made or needed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Finding duplicated constants

    Speaking of Report All Errors, here's a request to add it to the core:
    https://github.com/zencart/zencart/issues/2460
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Constants coming up instead of text assigned to constants
    By blk00xjc in forum General Questions
    Replies: 3
    Last Post: 25 Mar 2009, 10:11 PM
  2. defining constants
    By jumpy in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 31 Oct 2008, 07:57 PM
  3. Finding Constants and how to fix them
    By mommydesigns in forum General Questions
    Replies: 5
    Last Post: 22 Jun 2007, 08:57 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