1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed b4 js problem in acp

Discussion in 'Resolved Bug Reports' started by ragtek, Oct 27, 2011.

  1. ragtek

    ragtek Guest

    As you see the last / is missing....
    cachereb.PNG

    Possible fix:
    Code:
        protected function processJsUrls(array $jsFiles)
        {
            // add version number to each required file
            foreach ($jsFiles AS &$file)
            {
                $file = $file . (strpos($file, '?') ? '&' : '?') . '_v=' . XenForo_Application::$jsVersion;
            }
    
            // source XenForo JS from 'js/xenforo/x/' if required
            switch (XenForo_Application::get('options')->uncompressedJs)
            {
                case 1:
                    $jsFiles = str_replace('js/xenforo/', 'js/xenforo/full/', $jsFiles);
                    break;
    
                case 2:
                    $jsFiles = str_replace('js/xenforo', 'js/xenforo/min/', $jsFiles);
                    break;
            }
    
            // handle custom JS URL
            return preg_replace('#^js/#', XenForo_Application::$javaScriptUrl . '/', $jsFiles);
        }
    
    then it's working in the acp, but in the frontend the url is:
    bug2.PNG
     
    erich37 likes this.
  2. Floris

    Floris Guest

    XenForo doesn't come with the /min/ directory - which is why they are not found.
     
  3. Floris

    Floris Guest

    In the upgrade package that I used, I also do not see the fullcache_rebuild.js file.
     
  4. ragtek

    ragtek Guest

    it's only cache_rebuild.js and should be full/cache_rebuild.js
     
  5. Kier

    Kier XenForo Developer Staff Member

    I'm not sure how that function got so messed up. Fixed now.
     
    erich37 likes this.
  6. Alluidh

    Alluidh Well-Known Member

  7. CyclingTribe

    CyclingTribe Well-Known Member

    Has the download package been updated?
     
  8. Floris

    Floris Guest

    And, if we already have upgraded, should we re-do it? Or can we just replace a file and rebuild caches somehow?
     
  9. Kier

    Kier XenForo Developer Staff Member

    Here is the fix:
     

    Attached Files:

  10. DSF

    DSF Well-Known Member

    Is this fixed in the download?
     
  11. Floris

    Floris Guest

    Thanks!
     
  12. Kier

    Kier XenForo Developer Staff Member

    No. It will not affect most customers.
     
  13. infis

    infis Well-Known Member

    If you see message when appling patch: (Stripping trailing CRs from patch.) - and patch not appling.
    You are can install tofrodos (in Debian/Ubuntu - sudo apt-get install tofrodos) and use it as:
    Code:
    serv:# fromdos changeset_5065.diff
    serv:# fromdos Abstract.php
    serv:# patch < changeset_5065.diff
    serv:# todos Abstract.php
    
     
    GeeksChat likes this.
  14. Andrej

    Andrej Well-Known Member

    EDIT: Question revoked, I found it out!
     
  15. Floris

    Floris Guest

    I hope seeing it visual like this perhaps makes more sense:

    Screen shot 2011-10-27 at 8.09.42 PM.png

    You can either manually find the old code, and replace it with the new code.
    Or load the old file in a diff handler and parse it with the .diff that Kier provided.
     
    Andrej likes this.
  16. Andrej

    Andrej Well-Known Member

    This is even better explanation. Thank you. :)
     
  17. DSF

    DSF Well-Known Member

    Sorry, but this procedure is like the old BB-Boards :( and must be a outdated game.
     
  18. ragtek

    ragtek Guest

    But it's still a beta:p
     
    Marc likes this.
  19. DSF

    DSF Well-Known Member

    Just beta is a possibility to present a modern update-style.
    This is like a kitchen. Take a little bit salt and take a little bit sugar and then backed with 220 degree. Ooooh no!
     
  20. Floris

    Floris Guest

    So rather than not hearing from the developers at all, who just reply (if you're lucky) pointing to "this is beta, we dont' support it) they (within a couple of minutes) provide a patch .. and you whine about it.
     
    Daracon, Luke B and Marc like this.

Share This Page