Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2008
    Posts
    19
    Plugin Contributions
    1

    Default Corrupted path when searching for plugin css/js files

    I have a fresh install of zencart 2.0.0

    I am trying to pull in a global_jscript on the admin side but the getTemplatePart method is only called with a completely incorrect path



    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/css/ - /^global_stylesheet/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/css/ - /^plugin_manager_/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/css/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/css/ - /^global_stylesheet/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/css/ - /^global_stylesheet/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/css/ - /^global_stylesheet/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/css/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/includes/css/ - /^plugin_manager_/-.css
    zc_plugins/DisplayLogs/v3.0.2/catalog/includes/css/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/includes/javascript/ - /^plugin_manager_/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/includes/javascript/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/javascript/ - /^global_jscript/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/javascript/ - /^global_jscript/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/javascript/ - /^plugin_manager_/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/DisplayLogs/v3.0.2/admin/includes/javascript/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/RecentlyViewed/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/ProcessMonitor/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.php
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.js
    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/ - /^plugin_manager_/-.php

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,586
    Plugin Contributions
    88

    Default Re: Corrupted path when searching for plugin css/js files

    A couple of details would help us help you. Where is this global_jscript located?

  3. #3
    Join Date
    Mar 2008
    Posts
    19
    Plugin Contributions
    1

    Default Re: Corrupted path when searching for plugin css/js files

    In the plugin directory admin/javascript

    It looks for it on this line

    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/ - /^global_jscript/-.php

    But the path looks very suspect to me mainly due to the C: drive being referenced half way along the path or am I missing something as to how the getTemplatePart method works

  4. #4
    Join Date
    Jan 2004
    Posts
    66,384
    Blog Entries
    7
    Plugin Contributions
    81

    Default Re: Corrupted path when searching for plugin css/js files

    What is your PHP code that is triggering this?
    .

    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.

  5. #5
    Join Date
    Mar 2008
    Posts
    19
    Plugin Contributions
    1

    Default Re: Corrupted path when searching for plugin css/js files

    Not sure I understand your question.

    I added the line

    echo '+' .$checkDir . ' - ' . $templatePart . '-' . $fileExtension;

    To getTemplatePart in PageLoader to find out where it was looking for javascript files to include when I have plugins installed.

    This is, as far as I am aware a fresh install of zencart 2.0.0

    It generated the output I have shared.

    Now to me only 4 of the lines it produced look like the function is getting valid parameters passed to it.

    The rest looks like badly formatted data so the software is not looking in places that it should be.

    This is triggered when you load any admin page( haven't looked at the front end yet)

    I am not sure if it is a bug in the release or a miss configuration on my system.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,586
    Plugin Contributions
    88

    Default Re: Corrupted path when searching for plugin css/js files

    @DrByte is requesting that you post the section of your code that is performing that /javascript file load or to post a screenshot of the directory structure of your PhoneSystem plugin (including files and locations).

  7. #7
    Join Date
    Mar 2008
    Posts
    19
    Plugin Contributions
    1

    Default Re: Corrupted path when searching for plugin css/js files

    There is no section of my code performing the load.

    This is the standard loading code for the system that is creating this call to the function.

    It has nothing to do with my directory structure which is why I showed the lines for DisplayLogs plugin.

    But the directory structure is the same as DisplayLogs

    My first guess is it is looping over the plugins at two different levels in the call stack.

    If you add the line I have added to the class method does you system produce a more reasonable set of search locations?

    Come at this another way.

    Why is the function ever called with :-

    zc_plugins/DisplayLogs/v3.0.2/catalog/C:/projects/zencart-2.0.0/zc_plugins/PhoneSystem/v1.0.0/admin/includes/javascript/

    as the path which is obviously corrupted.

    Name:  DirectoryStructure.jpg
Views: 33
Size:  27.0 KB

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,586
    Plugin Contributions
    88

    Default Re: Corrupted path when searching for plugin css/js files

    It looks like the /javascript sub-directory is located at v1.0.0/admin/javascript instead of /v1.0.0/admin/includes/javascript. Was that intentional?
    Last edited by lat9; 14 May 2024 at 02:42 PM. Reason: Corrected perceived filepaths.

  9. #9
    Join Date
    Mar 2008
    Posts
    19
    Plugin Contributions
    1

    Default Re: Corrupted path when searching for plugin css/js files

    Excellent!

    Can I suggest not looping though all the plugins inside getTemplatePart if the $pageDirectory parameter includes 'zc_plugins' or is this necessary for some reason? Save a bit of io.

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,586
    Plugin Contributions
    88

    Default Re: Corrupted path when searching for plugin css/js files

    Quote Originally Posted by hellsbit View Post
    Excellent!

    Can I suggest not looping though all the plugins inside getTemplatePart if the $pageDirectory parameter includes 'zc_plugins' or is this necessary for some reason? Save a bit of io.
    Point taken. I'll need to review that method's usage as it might make the overall implementation more complex to save a teeny bit of I/O.

 

 

Similar Threads

  1. v200 Plugin path for icons
    By hellsbit in forum General Questions
    Replies: 9
    Last Post: 16 May 2024, 01:21 PM
  2. v155 How to check for corrupted php files?
    By Feznizzle in forum General Questions
    Replies: 2
    Last Post: 26 Oct 2017, 05:59 PM
  3. Searching for a plugin or "how to" to shorten page and product address url.
    By merchantdroid in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Jul 2013, 01:05 PM
  4. Duplicate IP searching for .js files
    By crinolina in forum General Questions
    Replies: 3
    Last Post: 12 Jun 2008, 11:13 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