Post excerpt showing urls after upgrade to 5.30 - ghost-blog

I just updated from Ghost 4.x to Ghost 5.x and all of a sudden I'm getting things like this from {{excerpt}}:
Originally published by Mobi Health News [https://www.mobihealthnews.com/news/upstream-raises-140m-scale-value-based-primary-care-support-services?mkt_tok=NDIwLVlOQS0yOTIAAAGIbq3LRAT3TSVIDdGo-yqCugCQAulToWn6iRcGu1VAMKVtx0Ml7RGTwZWfKPkvV0MK_lVsF4GqIIdTRRfpnVP7z4zFUr4mNT4MVImJKqkI] on December 1, 2022…
Before it was stripping out the url like so
Originally published by Mobi Health News on December 1, 2022. Upstream Healthcare, which offers technology and support services for...
Any ideas how to fix it?

Until Ghost updates their docs with a more elegant solution, you can remove the items manually with Javascript using Regex
let newExcerpt = item.node.excerpt.replace(/ *\[[^)]*\] */g, " ")
This will replace anything within [] parenthesis in your string. For example
"This link [https://google.com] works"
Would become
"This link works"

Related

RSS Google news language

I am creating a RSS feed from Google News and it's working so far, but I'd like to get news from 2 languages, not just English
This is my RSS URL so far:
https://news.google.com/rss/search?q=energy+efficiency
It's working fine, just need to add the 2 languages filter (German + English)
This is what I've found in different blogs, but I do not wish to filter the news by location, just by language:
"If you wish to have news in English and located from the United States sources, add the following query string to the URL to change country and language:"
&hl=en-US&gl=US&ceid=US:en
No matter how I modify the above URL, I get an error...
After reading lots of posts and playing around, I found the solution.
In case someone needs it:
https://news.google.com/rss?q=energy+efficiency&hl=en
Add the language code at the end of the link:
&hl=en //English
&hl=de //German

URL format for Google News RSS feed

Google deprecated the old RSS feed URL format December 1st 2017 (deprecation notice), in addition to that they dropped the button in the Google News interface to generate a RSS URL (news mentioning this change).
This means that there is no public or documented method of generating a new RSS link. The only documentation they have is out of date since they changed the interface.
What is the new format for generating a RSS feed for a Google News topic?
Found an up-to-date library (1) that uses Google News RSS.
The URL new format seems to be:
Top news:
https://news.google.com/news/rss
By major topic:
https://news.google.com/news/rss/headlines/section/topic/{topic}
Where {topic} is one of the following values: WORLD NATION BUSINESS TECHNOLOGY ENTERTAINMENT SPORTS SCIENCE HEALTH
By any/custom topic:
Once at https://news.google.com, browse to the desired topic, for example this. Identify the topic ID in its URL, e.g. CAAqIQgKIhtDQkFTRGdvSUwyMHZNR056T1hFU0FtVnVLQUFQAQ, and use the format:
https://news.google.com/rss/topics/{id}?hl={lang}
In the format above, essentially rss/ is added after https://news.google.com/.
By geolocation:
https://news.google.com/news/rss/headlines/section/geo/{location}
Not sure about the formatting for the {location} parameter
By search query:
New link: https://news.google.com/rss/search?q={query}
Old link: https://news.google.com/news/rss/search/section/q/{query}
Where the {query} parameter is a free text search
Specifying country and language:
For example if you wish to have news in Swedish and located from Swedish sources, add the following query string to the URL to change country and language to sv-SE:
?hl=sv&gl=SE&ceid=SE%3Asv
Requests to the Geo endpoint seem to be working again.
e.g. https://news.google.com/news/rss/headlines/section/geo/{place_name}
Also, if you use the non-geo search, you can specify a 7-day window by adding +when:7d to your search.
e.g. https://news.google.com/rss/search?q={key_words}+when:7d
This options isn't valid anymore:
https://news.google.com/news/rss/headlines/section/topic/{topic}
produces Error 500.
This seems to work:
https://news.google.com/news?cf=all&hl=en&pz=1&ned=us&q=astronomy&output=rss
The Geolocation mentioned above still works too. You can also specify city and state:
https://news.google.com/news/rss/headlines/section/geo/DenverCo
Updated Google RSS News Feed
You can try this as well.
https://news.google.com/rss?hl=en-NG&gl=NG&ceid=NG:en
I was also looking for documentation. This is the best article I found.
https://blog.newscatcherapi.com/google-news-rss/
If using search you can also specify not to include articles with a certain keyword.
e.g. if I wanted to search for pages that contain the word "apple" with out the word "pie" you can specify
q=apple%20-pie
or in full
https://news.google.com/rss/search?q=apple%20-pie&hl=en-GB&gl=UK&ceid=GB:en
The RSS feed for top stories is the simplest one. Just append RSS to the https://news.google.com and you get the RSS feed of the top stories of your location.
https://news.google.com/rss
Know more

Drupal 7 views of type Services fetches incomplete data

I have created a Service View using views module, where I have a field body of which the formatted as services raw. It is only showing me the first character in the body string (eg: if body string is "All men must die", It shows "A") shown as folling:
I wanted to get the complete text from the field body.
This is also happening if I have an entity reference field where formatter is set to Entity id, It gives me only the first digit of Entity uid (eg: if uid is 16, It shows 1)
Please help
I'm guessing you are using PHP 7.1
There's a known issue with the Services Views module; and seems like a fix has been committed to 7.x-1.x-dev branch on December 1, 2017.
I'd recommend reading through the issue #2910966
https://www.drupal.org/project/services_views/issues/2910966
Then, you will have to upgrade to the development branch to fix the issue you are having.
Make sure to backup your files and database before upgrading the module code.

How to filter for string in newsbeuter then move to folder?

I have 700 news feeds that I need to scan for the keyword/string "Linux" occurring in either title or the content of each new post.
I found how to filter in the docs
news docs
( title =~ "Linux" or content =~ "Linux" )
but I cannot find any indication of how to go the next step and push the message into another folder.
If possible, I am trying to work within the newsbeuter system because right now it opens up firefox perfectly for urls, I just want to avoid scrolling 700 folders.
config:
use-proxy yes
proxy yoda.server.com:3128
browser firefox
How do you filter and move and post based on string in newsbeuter?
Unfortunatelly, Newsbeuter doesn't support any kind of mass-refiling (yet), so what you're asking for can't be done.

Drupal Ubercart 2checkout, what DIRECT RETURN option to choose?

About "Direct Return" it is written here to choose "Header Redirect"
(3. Under Direct Return select Header Redirect.)
https://www.2checkout.com/shopping-cart/ubercart/
But it is written here to choose "Given links back to my website"
(3. Under Direct Return select Given links back to my website.)
http://www.ubercart.org/forum/support/31330/configure_2checkout_payment_ubercart_drupal_6
Do you know if given links back to my website is definitively the option to select?
More info about "How Does The Return Process Work?"
2checkout.com/blog/knowledge-base/merchants/tech-support/passbacks-and-returns/how-does-the-return-process-work/?plain
The return method depends on the version of the extension you are using. If you are using the version found at https://github.com/craigchristenson/ubercart-3-2checkout you use Header Redirect. The 2Checkout extension that is included in the Ubercart core uses Given Links back to my Website. Unfortunately the return function in the 2Checkout module that is included with UberCart has a bug and will not be fixed until the next release. In the mean time I suggest using the extension referenced at the URL above. If you have any trouble with your integration, you can contact 2Checkout directly for integration assistance.
Ok I think that I have found the solution here:
http://www.ubercart.org/project_issue/access_denied_2checkout_order_completion
1
The problem does not appear to be related to SSL. Their is an error in the ubercart 2Checkout return script that is causing this return issue. Ubercart is trying to verify the MD5 hash that is being passed back using a hash of secret word, vendor number, merchant_order_id, total which is incorrect and causing the validation to fail. To correct the issue please open the following file "drupal/modules/ubercart/payment/uc_2checkout/uc_2checkout.pages.inc" and edit line 20 so that it matches the following:
$valid = md5(variable_get('uc_2checkout_secret_word', 'tango') . $_POST['sid'] . $_POST['order_number'] . $_POST['total']);
So it really mean that there is no good 2checkout module for Ubercart and that the only solution is to hack line #20 ?
Ubercart has these issues addressed in the dev branches of UberCart 2 and 3. You can also get just the fixed 2Checkout modules at the URLs below:
UberCart-2 Drupal-6
https://github.com/craigchristenson/ubercart-2-2checkout
UberCart3 Drupal-7
https://github.com/craigchristenson/ubercart-3-2checkout

Resources