#40179 closed defect (bug) (invalid)
404 for two emojis
| Reported by: | 
  
     | 
      Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.7.3 | 
| Component: | Emoji | Keywords: | |
| Focuses: | performance | Cc: | |
| PR Number: | 
Description
My site with latest Wordpress 4.7.3 has the following errors:
The following requests are returning 404/410 responses. Either fix the broken links, or remove the references to the non-existent resources.
https://twemoji.maxcdn.com/2/1f641.svg
https://twemoji.maxcdn.com/2/1f642.svg
These errors come from /wp-includes/js/wp-emoji-release.min.js
Change History (4)
    
      
    #2
  
          follow-up:
    ↓ 4
    
        
          
            
 @
            
3 years ago
        
    
  
  
    
I don't have any plugin that could affect emojis. Please note that in /wp-includes/js/wp-emoji-release.min.js I see the following:
var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",
and so on. Not sure why the JS would select maxcdn over s.w.org.
[UPDATE]
I actually dug into that and I found one plugin that was meant to speed up the website had a code:
  # remove <link rel='dns-prefetch' href='//s.w.org' /> from the head:
  add_filter('emoji_svg_url','__return_false');
Could it be that it actually changes the CDN from s.w.org to maxcdn? And if yes - there seems to be some replication issues as some files are missing.
    
      
    #3
  
    
        
          
            
 @
            
3 years ago
        
    
  
  
  - Keywords reporter-feedback removed
 - Milestone Awaiting Review deleted
 - Resolution set to invalid
 - Status changed from new to closed
 
Could it be that it actually changes the CDN from s.w.org to maxcdn?
That's right. In this case I suggest creating an issue on their repo: https://github.com/twitter/twemoji
    
      
    #4
  
        in reply to:
    ↑ 2
    
        
          
            
 @
            
3 years ago
        
    
  
  
    
Replying to Grzegorz.Janoszka:
Please note that in /wp-includes/js/wp-emoji-release.min.js I see the following:
var p={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",
Right, that's the default value, but it's only used if no other value is specified via settings.svgUrl. WordPress does specify its own svgUrl value.
I actually dug into that and I found one plugin that was meant to speed up the website had a code:
# remove <link rel='dns-prefetch' href='//s.w.org' /> from the head: add_filter('emoji_svg_url','__return_false');Could it be that it actually changes the CDN from s.w.org to maxcdn?
Yes, that's exactly what it does. If the goal is just to remove the dns-prefetch resource hint, wp_resource_hints filter should have been used for that.
And if yes - there seems to be some replication issues as some files are missing.
For reference, the missing files are:
slightly frowning face: http://www.fileformat.info/info/unicode/char/1f641/index.htmslightly smiling face: http://www.fileformat.info/info/unicode/char/1f642/index.htm
Hello @Grzegorz.Janoszka, thanks for your report!
Are you using a plugin (or theme) which changes the CDN for the Emoji by any chance? The default CDN is https://s.w.org/ which has both images, see https://s.w.org/images/core/emoji/2.2.1/svg/1f641.svg and https://s.w.org/images/core/emoji/2.2.1/svg/1f642.svg.