• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Can't Edit Wiki Page with Main Icon Image via URL of an image on the internet

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Can't Edit Wiki Page with Main Icon Image via URL of an image on the internet

    • Issue Tools
      • View Changes
    1. issueid=6372 March 30, 2023 5:26 PM
      Vilandra Vilandra is offline
      New Member
      Can't Edit Wiki Page with Main Icon Image via URL of an image on the internet
      Error when trying to save a Wiki Page where the main icon image is an image on the internet.

      I was having this issue on 4.1.0 beta 2 and thought upgrading would fix it, but I still have the issue on 4.1.6. I am using an un-edited style on XF 2.2.12 (but was previously using 2.1.3 and had the same problem).

      When I try to save a wiki page (editing an existing one or creating a new one) I get this error:

      "The URL entered for the Main Icon Image does not point to a valid image resource and cannot be used."

      This happens when the icon already exists, so it's not like I'm changing the icon. And the icon shows up as normal on the category page and on the wiki page. The image is a png and does exist (I can go to the url and see the image). It is a 34kb file. Image size 130 x 180 pixels.

      I've been through all the settings but don't see anything that could be causing it, but maybe I'm missing something? I was able to do it at one time (because I set up the pages and edited them just fine for a while).

      This is a screenshot:

    Issue Details
    Issue Number 6372
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Images / Icons
    Status Fixed
    Priority 4 - Warnings / Script Errors
    Affected Version 4.1.6
    Fixed Version 4.1.7
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. April 1, 2023 1:01 AM
      pegasus pegasus is offline
      VaultWiki Team
      Being that the image URL is also your wiki's URL, I wonder if your server's internal hostname is the same (seems odd for the hostname to have www. in it though). In that case, it looks like there is a quirk of the IP resolver to return the local IP address of the server (127.0.0.1) which is blocked for security reasons. From what I can tell, it should be possible to force the resolver to always return the IP as if the request was coming externally.

      In src/addons/vw/vw/_core/model/url/vw.php, find:
      Code:
      $ips = @gethostbynamel($parts['host']);
      Replace with:
      Code:
      $ips = @gethostbynamel($parts['host'] . '.');
      Please let me know if this was the cause of the issue.
      Reply Reply  
    2. April 1, 2023 11:03 AM
      Vilandra Vilandra is offline
      New Member
      Nope, that wasn't it
      Reply Reply  
    3. April 2, 2023 2:04 AM
      pegasus pegasus is offline
      VaultWiki Team
      Okay, I've tried to use an image from your server and it appears that VaultWiki is checking headers for case-sensitive match when they should be treated insensitively (some of your server's headers are returned in lower-case).

      In src/addons/vw/vw/_core/controller/dm/base/vw.php, find:
      Code:
      					if (!empty($headers['Content-Type']))
      					{
      						if (is_array($headers['Content-Type']))
      						{
      							$content_type = array_pop($headers['Content-Type']);
      						}
      						else
      						{
      							$content_type = $headers['Content-Type'];
      						}
      
      						$content_type = explode('/', $content_type, 2);
      
      						if ($content_type[0] == 'image')
      						{
      							$icon = 'u|' . $icon;
      							return true;
      						}
      					}
      Replace with:
      Code:
      					foreach ($headers AS $hname => $hval)
      					{
      						$hname = strtolower($hname);
      
      						if ($hname == 'content-type')
      						{
      							if (is_array($hval))
      							{
      								$content_type = array_pop($hval);
      							}
      							else
      							{
      								$content_type = $hval;
      							}
      
      							$content_type = explode('/', $content_type, 2);
      
      							if ($content_type[0] == 'image')
      							{
      								$icon = 'u|' . $icon;
      								return true;
      							}
      						}
      					}
      When I make this change, I am able to validate images from your server. Marking as fixed in the next release.
      Reply Reply  
    4. April 2, 2023 2:17 PM
      Vilandra Vilandra is offline
      New Member
      Works! Thank you so much!
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 6:42 PM.
    This site uses cookies to help personalize content, to 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.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.