Error message showing up in Google search results - seo

When I search for a specific keyword in Google. The website shows up, but where normally the meta description is being displayed, it shows a error message instead:
Warning: Invalid argument supplied for foreach() in C:\domains\domain.com\wwwroot\wp-content\themes\canvas\somefile.php on line 417
How is it possible that google shows this line of text instead of a normal description?

Because it's probaly the thing that shows up in either the or google somehow onlyl got that result when fetching the page.
Google does not filter error messages.
for example if you search Warning: Invalid argument supplied for foreach() in on you get http://www.bibliotheekgulpen-wittem.nl/index.php/2013-11-04-09-27-41/bibliotheek-wise-ap/134-bibliotheek-wise-app-2014 with a invalid foreach.
Looking at the page itself there is nothing invalid to be seen in the source.
Just bad luck that when google fetched the page it had an error.

Related

Error when uploading Image to user when registering?

I am trying to upload the profile picture for my user when registering, but the error "An unhandled exception occurred while processing the request" happens, what is this and how can I fix it. I have successfully loaded the image for the Index page, but my Register got the error as shown below. Here is my code
Error Picture
enter image description here
The error seems to indicate that you did not register the implementation of IProfileRepository. Please, check if you are doing something like below, in you Startup:
services.AddScoped<IProfileRepository, ProfileRepository>()
If you are not, I believe that's the cause. The important error message is actually the "Unable to resolve service..." phrase, shown in the image :)

® symbol not being parsed in JSON-LD. Backslash(/) doesn't work

So I'm currently uploading a website schema and it has thrown up some parsing errors in a string. The ® symbol is showing up as shown below. However, adding a backslash does not seem to work and is still throwing up an error on Google's Structured Data Testing tool.
For example:
'''"name": "What is ___Secure®?",'''
This throws up the error shown.
But even when I add a backslash as an escape character, it doesn't show properly, as shown.
What is the way out of this?
Thanks.

Youtube data api token

I'm going through this tutorial: https://developers.google.com/youtube/v3/quickstart/php and I have come to a problem at step 4. I have ran the quickstart.php and got the link to the code, but I accidentally pressed "enter" without typing in the code. Now if I run it again I get an error:
PHP Fatal Error: Uncaught LogicException: refresh token must be passed in or set as part of setAccessToken.
I understand i can't make another token, i just would like to know how do I delete this token and make a new one.
Found the solution. I had to delete php-yt-oauth2.json file in home directory, which was declared here: define('CREDENTIALS_PATH', '~/php-yt-oauth2.json');.

Ghost: Custom error message

Is there a way to have custom error message. For example, instead of having Page Not Found for 404, we can have Page Non Trouvé (in french!).
Is it possible? Directly from the error.hbs page?
Or maybe is it a french pack?
Thanks!
Yes you can provide your own error.hbs file with your template (see: http://support.ghost.org/ghost-themes-overview/#error.hbs). In your custom error page you can show the error message in french or customize it's appearance with handlebars.
Ghost is going to provide better language support in the future. For now it's still on the wishlist (see: http://ideas.ghost.org/forums/285309-wishlist/suggestions/7191893-localization).

MediaElement Uncaught TypeError: Cannot read property 'tagName' of null

I would like to use MediaElement to serve all the videos/formats we have without creating different players. My first attempt was with an .mwv file with throws the error listed in the Title of this post. Next I tried an MP4 which seems to work fine. Then I tried an .flv file which also threw the same error listed in the title.
In Chrome I see "Uncaught TypeError: Cannot read property 'tagName' of null" the console which occurs in mediaelement-and-player.min.js at line 40 but the viewer part of the player doesn't display at all. In Firefox I see "TypeError: d is null" in the console at the same line number but the viewer part of the player DOES display and it says: "Video format or MIME type is not supported". The MediaElement documentation indicates that those types are supported but I can't seem to get them to play.
Either I mis-configured the player or I am passing the wrong content-type (I tried several) or this is a bug. I saw a similar post but the solution posted there was a little vague. I am going to try different files, formats and mime types to see if I can sort out the issue but I think this is a code problem. Ha anyone else been able to play flv or wmv files with mediaElement? Was there a trick to making it work?
I missed a step (or a directive) in the configuration. The 'tagName' error had to do with the content type I was using and was not defined in Glassfish. The reason that nothing was playing was that I forgot to list the class as "mejs-player" in the video tag.
Cleaning up those two things got the player working.