Topic-icon css validation

Active Subscriptions:

None
11 years 6 months ago #49216 by agmnet
css validation was created by agmnet
Dear,
How can i validate this code,
i got it after i install JFconnect.
the following error is:

Validation Output: 1 Error

Error Line 2, Column 121: Duplicate attribute prefix.
…//ogp.me/ns/fb/ittihadzgharta#" prefix="og: ogp.me/ns#" lang="ar-aa" di…
The topic has been locked.
Support Specialist
11 years 6 months ago #49231 by mel
Replied by mel on topic css validation
Looking at your page source, JFBConnect is adding
prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# ittihadzgharta: http://ogp.me/ns/fb/ittihadzgharta#"

while some other extension is adding
prefix="og: http://ogp.me/ns#"

This is not necessary to remove the warning for your page to function properly. However, if you care, you should remove it from whatever other extension is inserting it on the page, as they are not inserting all of the necessary namespaces.

-Melissa
The topic has been locked.
Active Subscriptions:

None
11 years 6 months ago #49240 by agmnet
Replied by agmnet on topic css validation
Hi Melissa,
The error code is provided by JFBconnect coz when i disable the JFBConnect Social Integration plugin the error goes.
The topic has been locked.
Support Specialist
11 years 6 months ago #49241 by alzander
Replied by alzander on topic css validation
Please read Mel's response above. There are 2 extensions adding the same tag to your page. Disabling either one would fix the problem. You should find and disable the other one as our longer tag is what is recommended by Facebook.

As previously noted, the error should not cause any functional issues on your page. If you are running into any *functional* issues, please let us know what they are and we'll gladly help you resolve them.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 6 months ago #49244 by agmnet
Replied by agmnet on topic css validation
Hi Alex,
i need my website to pass the validation test.
i disabled all the extensions related to social and opengraph and still gets this error code.
The topic has been locked.
Support Specialist
11 years 6 months ago #49245 by alzander
Replied by alzander on topic css validation
Something is adding it. I can't tell you what as I don't know all the extensions you have installed and I don't know every extension that tries to add that tag. It could be part of your template, SEF extension or coming from many other places.

If you require CSS validation, for some reason, you'll need to find where that tag is coming from. We can help you remove it from JFBConnect, but it's a change you'd need to make with every release, and we can't guarantee that all features of JFBConnect would work properly without that tag being set properly as we are currently doing it. Again, both tags should be fine from a *functional* standpoint. Whether you require CSS validation, which has very little value, is up to you.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 6 months ago #49246 by agmnet
Replied by agmnet on topic css validation
Dear Alex,
you can check by urself if i am using another extensions related to sef or opengraph, i disabled all the extensions and the error code sill occurs. it only disappear when i disable jfbconnect. if u like i can provide with login information.
thank you
The topic has been locked.
Support Specialist
11 years 6 months ago #49253 by alzander
Replied by alzander on topic css validation
No, that's not something we'd log in to your site to investigate. We don't know how every Joomla extension works, so I don't know if we'd be able to find out what it is either. If you're unsure what your site is doing, it's unlikely we'd be able to.

Something is adding the extra tag. I don't know what it is. Try different templates, disable all plugins. When you disable the JFBCSystem plugin, you can view the source HTML on the page and still see that the tag below is inserted:
prefix="og: http://ogp.me/ns#"
That's the tag you need to determine how it's being added.

As noted above, we can provide some code to disable our inclusion of the tag in JFBConnect, but it's not what we'd recommend.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 6 months ago #49273 by agmnet
Replied by agmnet on topic css validation
Ok Alex i found it, it is in k2 system plugin!
{
$response = JResponse::getBody();
$searches = array(
'<meta name="og:url"',
'<meta name="og:title"',
'<meta name="og:type"',
'<meta name="og:image"',
'<meta name="og:description"'
);
$replacements = array(
'<meta property="og:url"',
'<meta property="og:title"',
'<meta property="og:type"',
'<meta property="og:image"',
'<meta property="og:description"'
);
if (JString::strpos($response, 'prefix="og: ogp.me/ns#"') === false)
{
$searches[] = '<html ';
$searches[] = '<html>';
$replacements[] = '<html prefix="og: ogp.me/ns#" ';
$replacements[] = '<html prefix="og: ogp.me/ns#">';
}
$response = JString::str_ireplace($searches, $replacements, $response);
JResponse::setBody($response);
}

should i delete this code?
The topic has been locked.
Support Specialist
11 years 6 months ago #49274 by mel
Replied by mel on topic css validation
I would just try commenting this part out:
if (JString::strpos($response, 'prefix="og: http://ogp.me/ns#"') === false) 
        { 
            $searches[] = '<html '; 
            $searches[] = '<html>'; 
            $replacements[] = '<html prefix="og: http://ogp.me/ns#" '; 
            $replacements[] = '<html prefix="og: http://ogp.me/ns#">'; 
        }
The topic has been locked.