Forum Replies Created
-
AuthorPosts
-
December 21, 2022 at 7:15 pm in reply to: Custom Parameters Get truncated on replacement [part 2] #12216Aakash ChakravarthyKeymaster
Hi Dennis,
I tried the same code you tried and I’m not able to reproduce the issue.
It works fine in my case. Please find the screenshots below.
Please double check if there are no synstax issues and no nested double/single quotes. Also try switching themes or try the same on a different site without any plugins. That can help you check if any other plugin/theme is manipulating the output.
Thanks,
AakashAakash ChakravarthyKeymasterJeff,
WordPress caches the RSS feed for 12 hours by default. You can override the cache during testing by adding dummy characters like
?1
.
Example:http://mysitecom/rss.xml?1
Change the number and save the settings everytime you want to override the cache.You can also change the refresh duration permanently by placing the code below.
Thanks,
AakashAakash ChakravarthyKeymasterHi Jeff,
Yes, the issue with the space. I get the below error.
RSS Error: https://www.rfidjournal.com/category/news/feed is invalid XML, likely due to invalid characters. XML error: Reserved XML Name at line 5, column 39
I can suggest the following,
1) Inform the website owner and fix the RSS output.
2) Copy and paste the RSS feed content to your website as a.xml
file which is valid. Provide this file as RSS feed URL. Note: you migtht have to do this manually (or) do some kind of automation.
3) Write some PHP script which will act as proxy, clean the RSS feed (remove blank lines) and return a valid feed.I understand the suggestions are quite difficult, but just like any application the plugin accepts a valid RSS feed URL. The plugin cannot tweak and make the feed valid automatically. RSS feed parsers expect a valid one.
Thanks,
AakashAakash ChakravarthyKeymasterHi Gary,
Looks like you have a custom parameter named “name” i.e
name="Smith"
.Please use a custom parameter other than
name
, since it is used to invoke the shortcode.Thanks,
AakashAakash ChakravarthyKeymasterHi Dennis,
Shortcoder parameters accept double and single quotes only.
w.r.t the latest query, I did not understand that or the context. When you say it does not work in description, what does it mean? Is it related to shortcoder? Any sample code/example/screenshots on that?
Thanks,
AakashAakash ChakravarthyKeymasterHi Jeff, Terrence,
Yes, the RSS server for somereason prohibits requests from your site. They might block it based on the user agent, IP of the server etc.
The code I shared above will change the user agent and mimic a normal user. Hopefully the server is ok with that.
You can install a plugin like “code snippets” and paste the code in that.
Thanks,
AakashDecember 17, 2022 at 2:21 pm in reply to: Missing Shortcode = Non Useful Comment (Shortcode does not exist!) #12180Aakash ChakravarthyKeymasterSure, I can add the name of the shortcode name passed when not found.
Usually users know what shortcode they have inserted, so the comment was not descriptive. I’ll add this change in next version.
Aakash ChakravarthyKeymasterShortcodes created with Shortcoder are like any other shortcode you use.
I can add it to the Shortcoder’s doc too.
More info on dos and don’ts in WordPress’s docs below.
https://codex.wordpress.org/Shortcode_API#HTMLThanks,
AakashAakash ChakravarthyKeymasterPlease insert the shortcode with single quotes.
[sc name='attribution_for_all_plant_photos_needing_it' text='Geekstreet, CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0, via Wikimedia Commons'][/sc]
Aakash ChakravarthyKeymasterHi Jeff, Terrence,
The error code 403 means “prohibited”.
The RSS feed server is not allowing certain readers/servers to access that feed.Can you please paste the code below in your website and see if it works?
function srr_set_user_agent( &$feed, $url ) { $feed->set_useragent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'); } add_filter( 'wp_feed_options', 'srr_set_user_agent', 10, 2 );
Thanks,
AakashAakash ChakravarthyKeymasterHi Dennis,
I guess you need to clean up the HTML in the shortcode content so that the output is well formatted and free of syntax issues.
There are lots of “double quotes” and special characters in your HTML. You should spend some time analyzing and fixing them. Check if you can find any tools online to highlight the syntax and errors.
W.R.T shortcoder there are no restrictions. What you set is what you get. The plugin never manipulates user code.
Regarding default values, if no value is passed to the parameter for that specific shortcode call then the default value will be taken. There is no concept of inherited default values.
Thanks,
AakashAakash ChakravarthyKeymasterHi Brent,
Can you please share the page URL?
Thanks,
AakashDecember 15, 2022 at 12:11 am in reply to: Add second time notification bar is not showing to the user #12155Aakash ChakravarthyKeymasterHi Vladislav,
Thanks for using Announcer.
Can you please share more details on the issue?
Do you mean if the announcement bar is closed, it is not reshown when cache/cookies are cleared?Can you please share any website URL where issue is seen?
Thanks,
AakashAakash ChakravarthyKeymasterHi Dennis,
There is no restriction in the size of the custom parameter value.
My guess is that the HTML syntax is disturbed because of some wrong double quote.
Can you please “view page source” and check the HTML?
Confirm if the full text is replaced.If yes, then it means that the tag is malformated. You might have to fix the syntax.
I tried the example you shared and full text is replaced.
Thanks,
AakashAakash ChakravarthyKeymasterHi @grayson,
Shortcoder helps to create “shortcodes” for frequently used HTML/CSS/JS snippets. It does not alter the content. So what you see without a shortcode is what you see with a shortcode.
Glad that you found a workaround.
Thanks,
Aakash -
AuthorPosts