1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Error uploading images

Discussion in 'Showcase Support' started by OakleyForum, Aug 13, 2017.

  1. OakleyForum

    OakleyForum New Member Showcase

    Added new categories and set the image (same as I had originally done after adding them to the category_image directory) and got the error below. I commented out the lines to be able to access the add-on again (previously it just showed error), but I can't upload any images, I just get an error:

    Code:
    An exception occurred: Cannot save file data/showcase/category_image/007-baseball-cap.png in /home/oakleyfo/public_html/library/NFLJ/Showcase/Helper/Image.php on line 1011
    
    NFLJ_Showcase_Helper_Image->saveToPath() in NFLJ/Showcase/Template/Helper/Core.php at line 54
    NFLJ_Showcase_Template_Helper_Core::helperCategoryImage() in XenForo/Template/Helper/Core.php at line 853
    XenForo_Template_Helper_Core::callHelper() in /home/oakleyfo/public_html/internal_data/templates/S.2,L.1,nflj_showcase_index.php at line 192
    include() in XenForo/Template/Abstract.php at line 260
    XenForo_Template_Abstract->_renderInternal() in XenForo/Template/Abstract.php at line 191
    XenForo_Template_Abstract->render() in XenForo/Template/Public.php at line 110
    XenForo_Template_Public->render() in XenForo/ViewRenderer/HtmlPublic.php at line 124
    XenForo_ViewRenderer_HtmlPublic->renderContainer() in XenForo/FrontController.php at line 639
    XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
    XenForo_FrontController->run() in /home/oakleyfo/public_html/index.php at line 13
    Another example of when creating an item:

    Code:
    ErrorException: getimagesize(): Read error! - library/NFLJ/Showcase/Helper/Image.php:84
    Generated By: OakleyBoss, A moment ago
    Stack Trace
    #0 [internal function]: XenForo_Application::handlePhpError(8, 'getimagesize():...', '/home/oakleyfo/...', 84, Array)
    #1 /home/oakleyfo/public_html/library/NFLJ/Showcase/Helper/Image.php(84): getimagesize('/home/oakleyfo/...')
    #2 /home/oakleyfo/public_html/library/NFLJ/Showcase/Helper/Image.php(131): NFLJ_Showcase_Helper_Image->_readImageInfo()
    #3 /home/oakleyfo/public_html/library/NFLJ/Showcase/Helper/Image.php(1015): NFLJ_Showcase_Helper_Image->_setNewMainImage('/home/oakleyfo/...')
    #4 /home/oakleyfo/public_html/library/NFLJ/Showcase/Model/Attachment.php(43): NFLJ_Showcase_Helper_Image->saveToPath('/home/oakleyfo/...')
    #5 /home/oakleyfo/public_html/library/NFLJ/Showcase/ControllerPublic/Attachment.php(159): NFLJ_Showcase_Model_Attachment->insertUploadedAttachmentData(Object(XenForo_Upload), 2)
    #6 /home/oakleyfo/public_html/library/XenForo/FrontController.php(351): NFLJ_Showcase_ControllerPublic_Attachment->actionDoUpload()
    #7 /home/oakleyfo/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
    #8 /home/oakleyfo/public_html/index.php(13): XenForo_FrontController->run()
    #9 {main}
    Request State
    array(3) {
      ["url"] => string(134) "https://www.oakleyforum.com/oakley-database/attachment/do-upload.json?hash=4eb351662024142dd9a13e07ad6823e0&content_type=showcase_item"
      ["_GET"] => array(2) {
        ["hash"] => string(32) "4eb351662024142dd9a13e07ad6823e0"
        ["content_type"] => string(13) "showcase_item"
      }
      ["_POST"] => array(13) {
        ["_xfToken"] => string(8) "********"
        ["_xfNoRedirect"] => string(1) "1"
        ["_xfResponseType"] => string(4) "json"
        ["_xfSessionId"] => string(32) "5275aa11774e725fad89733e3943e87c"
        ["content_data"] => array(2) {
          ["item_id"] => string(4) "7825"
          ["category_id"] => string(4) "1409"
        }
        ["flowChunkNumber"] => string(1) "1"
        ["flowChunkSize"] => string(10) "4294967296"
        ["flowCurrentChunkSize"] => string(5) "43533"
        ["flowTotalSize"] => string(5) "43533"
        ["flowIdentifier"] => string(74) "43533-main_03-483_gascan_woodland-camo-black-iridium_001_62571_png_herojpg"
        ["flowFilename"] => string(69) "main_03-483_gascan_woodland-camo-black-iridium_001_62571_png_hero.jpg"
        ["flowRelativePath"] => string(69) "main_03-483_gascan_woodland-camo-black-iridium_001_62571_png_hero.jpg"
        ["flowTotalChunks"] => string(1) "1"
      }
    }
    
     
  2. Bob

    Bob Developer Staff Member

    Those are both FILE SYSTEM permissions issues.
     
  3. OakleyForum

    OakleyForum New Member Showcase

    What should the permissions be? Appears the permisions are all 755 for the data/showcase folder
     
    Last edited: Aug 13, 2017
  4. Bob

    Bob Developer Staff Member

    all folders in /data need to be either 755 or 777 depending on your OS. It needs to be recursive.

    The template helper takes the category images that you upload in the styles directory and attempts to make Tumbnails in the data/showcase/category_image directory. That directory needs to exist and it also needs to be 755 or 777 (again, depending on your OS).

    This category thumbnail functionality is standardized from XenForo Media Gallery (code is 100% the same as XFMG).
     
  5. OakleyForum

    OakleyForum New Member Showcase

    All folders were 755, even after making them 777, I still get the error. What's odd, is uploads to the XF forum still work 100%. Any other suggestions.
     

    Attached Files:

  6. Bob

    Bob Developer Staff Member

    Have you tried a different IMAGE?

    What is the image type, size, etc? Can you upload it here so I can test it out here?

    Not sure what to say as this is core XenForo (XenForo Media Gallery) functionality (borrowed and used in Showcase for 6 years now). This isn't something new and it hasn't changed since implementation. Its a pretty basic feature.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.