Skip Navigation

[Resolved] Something went wrong while fetching the dynamic content from the selected source

This thread is resolved. Here is a description of the problem and solution.

Problem: I am trying to edit a Content Template in the Block Editor but I see an error "Something went wrong while fetching the dynamic content from the selected source".

Solution: Use the "View with:" menu at the top of the block editor to select one of the posts you expect to display with this Content Template. That will fix the problem where Dynamic Sources have no context.

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 2 voices.

Last updated by benL-4 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1986959
Screenshot 2021-03-15 135702.jpg

I am trying to: add alt text to an image from a dynamic source. I used the 'name' field which is selectable in the side bar in the field group. It's already selected on the page for the page header. It works but I continue to see the error message in the edit area.

Link to a page where the issue can be seen: You can only see it in the edit area but if you check this page you see that the alt text is identical to the page name, which is what I intended: hidden link

I expected to see: the edit screen accept the change

Instead, I got: "Something went wrong while fetching the dynamic content from the selected source, with message: "Sorry, you are not allowed to do that."."

#1987299

Hi there, if you click the "X" icon on the right side of the red box with this message, does the warning box disappear? Does the message return repeatedly as you continue to edit the post, or is it permanently dismissed?

If the message returns repeatedly, we can try some troubleshooting steps to try to resolve the problem.
- Temporarily deactivate all plugins except Types and Blocks
- Temporarily activate the parent Astra theme
- Temporarily deactivate any custom code snippets in Toolset > Settings > Custom Code tab
- Reload the Content Template editor page and test again
- If the error message does not return, it indicates a conflict between Toolset and another component. You can reactivate your child theme, custom code snippets, and other plugins one-by-one, testing each time until the problem returns.
- If the error message is still shown, try deleting the image block and recreating it. Sometimes this solves a problem that gets stuck in the editor's cache
- If that does not solve the problem, I'll need to take a closer look.

Let me know what you find out, and we can go from there. Thank you!

#1987501
Screenshot 2021-03-15 154330.jpg
Screenshot 2021-03-15 154254.jpg

Hello Christian,

Yes, it disappeared but it kept reappearing. I also noticed that there was no longer any option to change the size of the image in the sidebar. So I deleted the image entirely, resized it, formatted it the way I wanted, and added the dynamic alt text again. The error message no longer appears.

However, the rounded corners of the image that show in the edit screen do not appear in Chrome, Edge, or Firefox on a desktop PC., nor do they appear on my iPhone.

Thanks,
Ben

#1987953
Screenshot 2021-03-15 192314.jpg

It's still happening.

#1987965

Okay I probably need to log in and take a closer look. Can you provide login credentials in the private reply fields here? I may need to create a clone of your site using the All-in-One WP Migration plugin. Let me know if that's okay.

#1988123
Screen Shot 2021-03-15 at 4.55.12 PM.png
Screen Shot 2021-03-15 at 4.54.59 PM.png
view-with-empty.png

Okay I think the message is appearing because there is no post selected up at the top in the "View with:" menu. Sometimes this happens when a different Content Template is applied to the post that was originally selected here in the "View with:" menu, and the template is disassociated with that post. When you're designing a Content Template, you should select one of the posts you expect to display with this template up at the top. Otherwise, the Block Editor's dynamic sources feature does not know for sure which post to use as the context for Dynamic Sources. I selected "Unst Airport" up top and saved the template, then refreshed the page. The error message does not reappear for me now, can you check?

As far as the image's rounded corners, WordPress styles are overriding the block editor's border radius settings in this case. From /wp-content/plugins/gutenberg/build/block-library/style.css?ver=1615647229:

.wp-block-image:not(.is-style-rounded) img {
    border-radius: inherit;
}

I added some CSS code to override that WP override. In the Content Template CSS panel, I added:

.border-radius-25-px img {
  border-radius: 25px;
}

Then I selected the image block and added the CSS class border-radius-25-px. This should solve the problem whee border-radius is not applied as expected. If not, feel free to open a separate ticket so we can discuss in more detail. Our policy is one issue per ticket, and I would like to focus on the "You are not allowed to do that" error message in this ticket.

#1988169

Thank you. The error is no longer showing. I'll raise a separate ticket for the other issue because the CSS you added doesn't appear to have fixed that as far as I can see on browser checks.