Содержание
- problems with code validation when “Alter HTML” is enabled
- Стоп элемента отсутствует требуемое смещение атрибута на SVG Linear Gradient Fill
- 1 ответ
- Похожие вопросы:
- itemprop=»mainEntityOfPage» — Error: Element META is missing required attribute CONTENT. #263
- Comments
- Error: Missing required attribute in 0.12 #19468
- Comments
- Terraform Version
- Terraform Configuration Files
- Debug Output
- Crash Output
- Expected Behavior
- Actual Behavior
- Steps to Reproduce
- Additional Context
- References
- Footer
- Technical Q&A
- Element img is missing required attribute src
- Element img is missing required attribute src
- Re: Element img is missing required attribute src
- Re: Element img is missing required attribute src
problems with code validation when “Alter HTML” is enabled
in the source code of the site, I see validation errors (on validator.w3) when the plugin is enabled, these options:
and also, if i do not include “Alter HTML”, then the image does not show in the site logo. somewhere incorrectly replaces. it tested in work on The7 template
maybe there is an even simpler method for generating webp images (universal and less painful for all templates in the integration, so that the code is cleaner), writing a rule in htaccess and adding images created in a separate folder
And no validation errors without Alter HTML, I suppose?
The first error message says that element must have “srcset” attribute. I can see that it has “data-srcset” attribute.
How can this happen? I dug into it and found that the problem occurs when both “srcset” and “data-srcset” (or “data-lazy-srcset”) are set on an image. If both are present, only the “data-srcset” will be used.
The result becomes:
- This reply was modified 1 year, 2 months ago by rosell.dk .
- This reply was modified 1 year, 2 months ago by rosell.dk .
You are suggesting using .htaccess instead of altering HTML. WebP Express already allows you to do that 🙂 (in the “Varied Image Responses” operation mode)
- This reply was modified 1 year, 2 months ago by rosell.dk .
- This reply was modified 1 year, 2 months ago by rosell.dk .
Thanks for the replies and updates of the useful plugin
Earlier it showed errors with the method: “How to replace:? The complete page (using output buffering)”
and sometimes in the template the logo in the header of the site disappeared from the mobile adaptive version (but this is not on all templates, on generatepress ok, for example on the7 it may be so arranged that it was not quite ok in it)
then changed to this method
“How to replace:? Use content filtering hooks (the_content, the_excerpt, etc)”
but it does not convert the site logo to this format
now, when I double-check, I see that both show ok
I will check it again, but most likely everything is ok already)
and often have to be disabled on many shared hosting: “Enable direct redirection to existing converted images?
Enable redirection to converter?
Create webp files upon request? ”
but as I understand it, these are optional options
on the7 template shows this yet, but not entirely critical (there were a lot of code validation notifications before):
Error: Bad value wp-content / webp-express / webp-images / uploads / logo.png.webp 307w, wp-content / webp-express / webp-images / uploads / logo.png.webp 307w for attribute srcset on element source: Width for image wp-c… ges / uploads / logo.png.webp is identical to width for image wp-c… ges / uploads / logo.png.webp.
From line 71, column 128; to line 71, column 345
Error: Bad value wp-content / uploads / logo.png 307w, wp-content / uploads / logo.png 307w for attribute srcset on element img: Width for image wp-content / uploads / logo.png is identical to width for image wp-content / uploads / logo.png.
From line 71, column 346; to line 71, column 621
Ok, the problem you now report is that you get HTML like this:
The complaint from the validator is that it makes no sense to specify the same width twice in an srcset, neither in a “source” tag, nor in an “img” tag.
I’m puzzled how this came to happen.
Can you provide the HTML before it was altered by my plugin?
I have btw fixed the other issues in the library that alters HTML. These fixes will be part of next WebP Express release.
- This reply was modified 1 year, 2 months ago by rosell.dk .
- This reply was modified 1 year, 2 months ago by rosell.dk .
I have now released the fixes.
I have NOT done anything about the extra issue that you reported. I need some more info on that (see my last reply).
- This reply was modified 1 year, 2 months ago by rosell.dk .
@se8pro: I’m still interested if you could provide the HTML.
Источник
Стоп элемента отсутствует требуемое смещение атрибута на SVG Linear Gradient Fill
W3 валидация выкидывает следующую ошибку :-
Может кто пожалуйста посоветовать что такое отсутствующий атрибут / как он применяется.
1 ответ
Я для построения своего веб-сайта использую WebMatrix, и у меня вовзращаются некоторые компоненты из шаблона Bakery. Конкретно я пытаюсь подгрузить некоторые .js файлы. посредством использования тега script. Вот точный код который я дергаю из шаблона Bakery который прекрасно работает: @section.
Надеюсь кто-то там мог испытать это странное поведение svg линейной градиентной заливки, которая не отображается resp. применяется вообще в стандартных браузерах. Другие свойства как обводка работают как ожидается, но не заливка! Элемент вроде как прозрачен. Я собственно разобрался что могут быть.
У некоторых стоп элементов есть атрибут offset в вашем примере, у некоторых нет. Вам нужно добавить атрибут offset ко всем тем у которых нет.
где вы заменяете со значением, возможно 0.
Похожие вопросы:
Есть ли у элемента select атрибут required?
При выполнении градиентной заливки на графике области, используются соотношения градиента только между мин и макс графика. Область ниже мин потом заполняется последним цветом в градиенте. Чтобы.
Пытаюсь сделать svg фигуры с круговой градиентной заливкой. Использование делает эллиптическую градиентную заливку в отличие от круговых градиентов как показано в this fiddle.
Я для построения своего веб-сайта использую WebMatrix, и у меня вовзращаются некоторые компоненты из шаблона Bakery. Конкретно я пытаюсь подгрузить некоторые .js файлы. посредством использования.
Надеюсь кто-то там мог испытать это странное поведение svg линейной градиентной заливки, которая не отображается resp. применяется вообще в стандартных браузерах. Другие свойства как обводка.
Можно ли с помощью чистого CSS (нет JS) задать цвет заливки инлайнового SVG? У меня есть элемент с неким контентом и мне нужно Сбросить контент на простое SVG изображение (в основном глиф).
Я пытаюсь добавить структурированные сниппеты данных. Но он показывает некоторые ошибки в валидации W3C. Адрес сайта: www.truewayfze.com Error Line 14, Column 73: Element link is missing required.
Получаю следующую ошибку исключения пытаясь подгрузить файл-вложение в память при использовании функции .load(). The required attribute ‘Id’ is missing Я не могу явно присвоить свойство Id потому.
ищу градиентный эффект заливки похожий на прикрепленное изображение , пробовал что-то подобное но не получается, кто-нибудь делал что-то похожее? Если да то прошу поделиться своим отзывом.
Мне нужно создать градиентную заливку cell как на картинке ниже, используя Apache POI. Я использовал этот код для создания простой градиентной заливки, но мне нужна именно такая как на картинке.
Источник
itemprop=»mainEntityOfPage» — Error: Element META is missing required attribute CONTENT. #263
In web page http://www.m2-spb.ru/com01_print_test
I’ve used itemprop=»mainEntityOfPage» without attribute CONTENT.
Where is the truth?
The text was updated successfully, but these errors were encountered:
The related HTML conformance requirement for is:
Exactly one of the name, http-equiv, charset, and itemprop attributes must be specified.
If either name, http-equiv, or itemprop is specified, then the content attribute must also be specified. Otherwise, it must be omitted.
https://w3c.github.io/html/document-metadata.html#the-meta-element
So use of itemprop on without a content attribute is non conforming in HTML.
I think this is a duplicate of #192.
(Edited to clarify that there are several different valid ways.)
Google’s Microdata example is invalid; adding a content attribute (even if empty) makes it valid. But their example markup is not necessarily the best choice, depending on your situation. There are several different ways how to specify mainEntityOfPage in Microdata. The most simple one is to provide a URL value (instead of an item value), in which case you must use the link (or a etc.) element:
Yeah the Microdata section of the HTML spec (which @stevefaulkner cited) is very clear on this. So as @unor noted, Google has an invalid example in their docs. If you think that example should in fact be valid, you should file an issue against the HTML spec https://github.com/whatwg/html/issues/new (since the HTML spec is the single ultimate source of truth here).
Short of that, I can’t make this a non-error in the checker—because the checker must conform to the requirements in the HTML spec (though I do realize it would be good to have an error message for this case that’s more helpful than the current one is).
As far as how to mark it up in a way that’s not an error per the HTML spec, I recommend paying attention to anything unor suggests, because in my experience with discussions about this stuff here and at StackOverflow, unor has more insight in how to use Microdata and RDFa productively in the real-world than pretty much anybody else.
So I need to use empty content attribute.
And it is not the error.
Is it right?
So I need to use empty content attribute.
And it is not the error.
Is it right?
No, that’s not right. You need to instead do add @unor suggested, and use a link element instead:
Источник
Error: Missing required attribute in 0.12 #19468
I think there is an issue with handling computed variable values in 0.12.0-alpha2. I’m trying to create a simple module to manage AWS VPCs and hitting an issue. The error points to the closing brackets of the module resource (rather unhelpfully)
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
Expected Behavior
Plan gets created with relevant IDs computed
Actual Behavior
the command ends with an error
Steps to Reproduce
- terraform init
- terraform plan
Additional Context
Strangly enough, when I remove the offending lines from the module the plan runs but never creates a tfstate.
References
The text was updated successfully, but these errors were encountered:
This appears to be fixed in master, but I did have to simplify the config slightly not having all the variable declarations. If this doesn’t work for you, feel free to reply here and we can open this back up for further investigation.
Unfortunately still fails with the same error using latest build:
As for variables declaration, this should help:
Thanks for the follow up, but I’m still not able to reproduce the issue.
The error indicates that there is a variable called vpc_id in the module without a default, which is why it’s a required argument in the module block. Can you find where that variable is declared in your configuration?
Yep, you’re right @jbardin, adding an empty default to the variable definition fixes that issue. A bit counter-intuitive but I can live with that. Many thanks again.
Just a follow-up. I started to have this issue when I «divided» my Terraform in modules. If I don’t put a default = «»in my vars I got the error.
I’m going to lock this issue because it has been closed for 30 days ⏳ . This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Technical Q&A
Liquid, JavaScript, themes, sales channels
To continue receiving payouts, you need to secure your account by turning on two-step authentication before January 18th, 2023. If two-step authentication is not turned on your payouts will be paused. Learn more
- Shopify Community
- :
- Shopify Discussion
- :
- Technical Q&A
- :
- Element img is missing required attribute src
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Element img is missing required attribute src
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Element img is missing required attribute src
Hey there, I get this HTML markup error for all images on the shop homepage — any idea how this can be fixed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Element img is missing required attribute src
Post your site without the password, preview link, or some Liquid/HTML markup of that specific problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Element img is missing required attribute src
W3 results look like this for all images on the start page:
Element img is missing required attribute src.
From line 1133 , column 80 ; to line 1139 , column 7
Источник
28 минут назад, holistic сказал:
Более того, неизвестны последствия, будут ли изображения, выведенные через data-src (без обычного «src»), сканированы основными поисковиками?
Вам неизвестны, а нам известны. Поисковики индексируют картинки через содержание data-src что описано самими поисковиками на их сайтах в их документации и уже обсуждалось здесь на форуме.
28 минут назад, holistic сказал:
Получается, что новая функция «Отложенная загрузка изображений» дает большое кол-во ошибок на странице, проверяя через validator.w3.org, ибо валидатору неизвестен параметр — data-src
И получаем:
— Error: Element img is missing required attribute src.
Как разработчики смогут всё это исправить (или это не поддается исправлению)?
Это вообще не подлежит и не может подлежать исправлению. Пока не станет официальной специкацией HTML. Но это вам уже не к нам, а консорциум w3с. Поэтому вам в данном случае нужно для себя определиться что для вас важнее: отложенная загрузка и увеличенная скорость загрузки вашего сайта или сообщения валидаторов.
Details
-
Type:
Bug
-
Status:
Open -
Priority:
Minor -
Resolution:
Unresolved
-
Affects Version/s:
1.9
-
Fix Version/s:
None
-
Component/s:
None
Description
This issue prevents rendering of this SVGs from Wikipedia:
- https://upload.wikimedia.org/wikipedia/commons/8/8d/Antu_folder-yellow.svg
- https://upload.wikimedia.org/wikipedia/commons/d/d7/Breezeicons-places-64-folder-orange.svg
Relevant code snippet from Breezeicons-places-64-folder-orange.svg:
<linearGradient id="linearGradient4172-0"> <stop style="stop-color:#f89406" id="stop4174-4"/> <stop offset="1" style="stop-color:#faa938" id="stop4176-5"/> </linearGradient>
Cause exception:
The attribute "offset" of the element <stop> is required
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:227)
at org.apache.batik.transcoder.image.ImageTranscoder.transcode(ImageTranscoder.java:92)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
Attachments
Activity
The SVG <stop>
element defines a color and its position to use on a gradient. This element is always a child of a <linearGradient>
or <radialGradient>
element.
Example
html,
body,
svg {
height: 100%;
}
<svg
viewBox="0 0 10 10"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<linearGradient id="myGradient" gradientTransform="rotate(90)">
<stop offset="5%" stop-color="gold" />
<stop offset="95%" stop-color="red" />
</linearGradient>
</defs>
<!-- using my linear gradient -->
<circle cx="5" cy="5" r="4" fill="url('#myGradient')" />
</svg>
Attributes
offset
-
This attribute defines where the gradient stop is placed along the gradient vector.
Value type: <number>|<percentage>; Default value:0
; Animatable: yes stop-color
-
This attribute defines the color of the gradient stop. It can be used as a CSS property.
Value type:currentcolor
|<color>|<icccolor>; Default value:black
; Animatable: yes stop-opacity
-
This attribute defines the opacity of the gradient stop. It can be used as a CSS property.
Value type: <opacity>; Default value:1
; Animatable: yes
Global attributes
Usage notes
Categories | Gradient element |
---|---|
Permitted content | Any number of the following elements, in any order:<animate> , <animateColor> , <set> |
Specifications
Specification |
---|
Scalable Vector Graphics (SVG) 2 # GradientStops |
Browser compatibility
BCD tables only load in the browser
Hello,
in the source code of the site, I see validation errors (on validator.w3) when the plugin is enabled, these options:
switch options to ON:
-Alter HTML
-Replace <img> tags with <picture> tags, adding the webp to srcset.
-Dynamically load picturefill.js on older browsers
-Reference webps that haven't been converted yet
-Use content filtering hooks (the_content, the_excerpt, etc)
Errors validation:
Error: Element source is missing required attribute srcset.
<source data-srcset="/wp-content/webp-express/webp-images/uploads/img.jpg.webp 150w" sizes="(max-width: 286px) 100vw, 286px" type="image/webp">
Error: The sizes attribute may be specified only if the srcset attribute is also present.
<source data-srcset="/wp-content/webp-express/webp-images/uploads/img.jpg.webp 150w" sizes="(max-width: 286px) 100vw, 286px" type="image/webp">
Error: Bad value image/svg+xml;charset=utf-8,%3Csvg xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox%3D'0 0 280 187'%2F%3E for attribute src on element img: Illegal character in path segment: space is not allowed.
<img width="280" height="187" src="image/svg+xml;charset=utf-8,%3Csvg xmlns%3D'http%3A%2F%2Fwww.domain.com/wp-content/uploads/img.jpg 150w" sizes="(max-width: 280px) 100vw, 280px">
and also, if i do not include “Alter HTML”, then the image does not show in the site logo. somewhere incorrectly replaces. it tested in work on The7 template