[cv6] Custom Field Extension

[cv6] Custom Field Extension 1.1.0 Release Candidate 3

No permission to download
Hi all. I am back on this project. Started to port in to XF 2.3.

@SpecialK with every image, did you checked a small one?
Also, should note that this only happens when actually trying to post the thread. The image uploads and is processed just fine. Only when hitting the "Post Thread" button is the error generated.
 
I took a quick glance. The problem is that xf_cv6_custom_image.field_source has a max length of 25 characters. But the code isn't truncating the field source or checking to make sure it meets that length requirement. In my test thread, the string that it's trying to insert is 26 characters long - thread-node-329-user-40409 - so that's the issue. For now, increasing the column width to 50 fixed the issue but a permanent fix should be investigated and implemented.
 
Hi all. I am back on this project. Started to port in to XF 2.3.
@Hoffi Any news on the udpate? I'm using RC2 on XF 2.3.6 and every time a member visits "Account Details", I get this server error:

Code:
[LIST]
[*]               
[*]XF\CssRenderException: Error rendering template public:cv6_customfields.less: variable @fa-var-search is undefined in file public:cv6_customfields.less in public:cv6_customfields.less in public:cv6_customfields.less (on or near line 1)
[*]              
[*]src/XF/CssRenderException.php:89
[*]           
[/LIST]
          
[LIST]
[*]               
[*]Generated by: Unknown account
[*]              
[*]Apr 25, 2025 at 5:20 AM
[*]           
[/LIST]
       
      
[HEADING=2]Stack trace[/HEADING]
      
           
*1*| // Note that this file should never output any CSS directly. It should contain variables and mixins only.
 2 | // Output should go into core.less.
 3 |
 4 | // ################################ VARIABLES ###############################
------------

#0 src/XF/CssRenderer.php(435): XF\CssRenderException::createFromLessException(Object(Less_Exception_Compiler), 'public:cv6_cust...', '// Note that th...')
#1 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:cv6_cust...', '// Note that th...')
#2 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:cv6_cust...', NULL)
#3 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#5 css.php(32): XF\CssWriter->run(Array, 12, 1, 'fa9c3c122c79e68...')
#6 {main}

-------------

Previous Less_Exception_Compiler: variable @fa-var-search is undefined in file anonymous-file-279.less in anonymous-file-279.less in anonymous-file-279.less - src/vendor/oyejorge/less.php/lib/Less/Tree/Mixin/Call.php:130
#0 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(147): Less_Tree_Mixin_Call->compile(Object(Less_Environment))
#1 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(90): Less_Tree_Ruleset->EvalMixinCalls(Object(Less_Tree_Ruleset), Object(Less_Environment), 18)
#2 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Object(Less_Environment))
#3 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Object(Less_Environment))
#4 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Object(Less_Environment))
#5 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(95): Less_Tree_Ruleset->compile(Object(Less_Environment))
#6 src/vendor/oyejorge/less.php/lib/Less/Parser.php(181): Less_Tree_Ruleset->compile(Object(Less_Environment))
#7 src/XF/CssRenderer.php(431): Less_Parser->getCss()
#8 src/XF/CssRenderer.php(371): XF\CssRenderer->renderToCss('public:cv6_cust...', '// Note that th...')
#9 src/XF/CssRenderer.php(279): XF\CssRenderer->renderTemplate('public:cv6_cust...', NULL)
#10 src/XF/CssRenderer.php(135): XF\CssRenderer->renderTemplates(Array, Array, Array)
#11 src/XF/CssWriter.php(60): XF\CssRenderer->render(Array)
#12 css.php(32): XF\CssWriter->run(Array, 12, 1, 'fa9c3c122c79e68...')
#13 {main}
       
      
[HEADING=2]Request state[/HEADING]
      
           
array(4) {
  ["url"] => string(221) "/css.php?css=public%3Aalnb_navigation.less%2Cpublic%3Acv6_customfields.less%2Cpublic%3Aeditor.less%2Cpublic%3AsvAlertImprovements.less%2Cpublic%3Aextra.less&s=12&l=1&d=1745575578&k=fa9c3c122c79e68c2e7e1dd9cf80f3752b4a69bd"
  ["referrer"] => string(48) "https://xxxxx.com/account/account-details"
  ["_GET"] => array(5) {
    ["css"] => string(125) "public:alnb_navigation.less,public:cv6_customfields.less,public:editor.less,public:svAlertImprovements.less,public:extra.less"
    ["s"] => string(2) "12"
    ["l"] => string(1) "1"
    ["d"] => string(10) "1745575578"
    ["k"] => string(40) "fa9c3c122c79e68c2e7e1dd9cf80f3752b4a69bd"
  }
  ["_POST"] => array(0) {
  }
}

Any ideas? It's not too big a deal, and doesn't seem to affect anything, but still... :)
 
Back
Top Bottom