Magento 2, PageBuilder - adding custom content type - module

I'm trying to add custom content type to existing page builder module in Magento 2 following https://devdocs.magento.com/page-builder/docs/create-custom-content-type/overview.html
Bit of a problem that docs is kind of outdated, but the biggest issue for me right now, is that for some reason, panel with settings of content type is not loading. Console doesn't throw any errors and I'm not even sure how to debug this.
Normal behavior: https://drive.google.com/open?id=1OClPda-WGuc7idNogUnTz0wi4ZSk_Qu_
Behavior of custom content type (settings are not loading at all): https://drive.google.com/open?id=1I-IeTImec-M8DuLfgjiA193mhm0Fwtd8
Maybe someone already stumbled upon issue like this and know possible ways to solve it?

Ok I've found out what problem was, so I'm answering this question in case someone will need this in future.
Check your ui_component xml structure, I was having an issue with naming there (namespace was not correct), and that's why it was not loading.

Related

Error report on FBSDKLoginButton

I have the following error and I have no idea where it's coming from.
I really need help.
Thank you.Click here to see
Problem solved.
If like me you encounter this type of problem it could be due to a language change in your settings (localization) or your main storyboard.
What I did is I put back everything to default, did a Product > Clean, and deleted the app and reinstalled it.

Partial view never affects site after upload and IIS reset

I'm including a partial view in one of the pages of my MVC4 site which when deployed, even after a restart of the web site and recycling of the app pool, never seems to affect the site
I'm wondering if this is caching coming into play
I ended up including the content of the partial view in the page iteself and that seems to have worked but I'd rather have the partial view as I'd like to use the view in other parts of the site
The question is, does anyone have any suggestions as to why this might be happening? I've been pulling my hair out trying to get a view to post the correct data, only to realise that some of the hidden inputs are just missing because the partial view has not been refreshed
EDIT:
Ok now I have a need to use this partial view in more than once place. On my dev environment the partial is rendering correctly. Uploading to the server doesn't seem to have any effect, but what's worse, deleting the partial view from the server also has the same issue.
My site still thinks the file is there and complains about the model type passed to the view now (I changed the model type in the view - all working fine on my local dev) - why does it still think the file is there?
I deleted one of the parent views to see if the site carried on working, but as soon as I delete any other file, the site is affected. Why is this particular file giving me trouble? It's as if the server has cached it at the file system level and is supplying the wrong file content to ASP.NET
I'm going to try renaming the file next
Ok so renaming the file appears to have worked.
I didn't try Fals suggestion but I might try that next time, strange behaviour I'm not going to try and understand why at this point!

OpenCart auto complete broken on featured module

apologies if this has already been covered.
I have an issue where i can't add products to the featured module as the auto-complete doesn't find anything and never drops down. Is this something that's happened for any one else?
Currently using v1.5.6
Error shown in console after any action on the featured module admin page is...
"event.returnValue is deprecated. Please use the standard event.preventDefault() instead. "
OpenCarts error log shows...
'PHP Notice: Undefined variable: filter_category in /home/sites/cardboutique.ie/public_html/admin/controller/catalog/product.php on line 1434'
I've re-upped all the files (as it was working) but no joy.
I also doubt the first error is the main issue but don't have decent enough knowledge to vouch for that.

Xcode error when ctrl-dragging image to new class

I already asked this in the Apple Dev Forum but received no replies, so I'll try here.
I'm unsure if this is a bug or whether I've missed something since I'm still very new to programming.
I have multiple view controllers and have made multiple classes. I have set the custom class "bit" of each view controller to the revelent class. When I ctrl-drag anything from the view to the relevent class header, I get the usual pop-up. I fill in the info, press connect, and BAM. It does the same kind of error whether I choose "Outlet" or "Action" It worked in the previous Xcode but I'm not sure if I've forgotten something.
The view controller and class that I added with Xcode 4 is still working beatifully.
I've tried adding the image manually but all that gave me was a SIGBART error just trying to get to the view. Again, I may have missed something, but I don't think there's much to miss is there?
Any help would be appreciated.
Just to eliminate a few things... I've deleted derived data, restarted Xcode and done a "clean". That's all I can remember that I've done.
Problem solved:
When selecting the implementation file. When I looked in the File Inspector, I found that under "Target Membership", the app name wasn't ticked. I ticked it and it now works well.
Since I didn't need to do that in Xcode 4, I suspect in Xcode 5, it doesn't do that automatically. Maybe that's a bug? I don't know if it was deliberate by Apple, but I think I'll file a bug report anyway since It's a bit of a nuisance.

How to stop firefox from downloading and applying CSS via a firefox extension?

Thanks to everyone in advance -
So I have been banging on this issue for quite a while now and have burned through all my options. My current approach to canceling css requests is with nsIRequest.cancel inside of nsIWebProgressListener.onStateChange. This works most of the time, except when things are a little laggy a few will slip through and jump out of the loadgroup before I can get to them. This is obviously a dirty solution.
I have read through the following links to try and get a better idea of how to disable css before a nsIRequest is created...no dice.
https://developer.mozilla.org/en/Document_Loading_-_From_Load_Start_to_Finding_a_Handler
https://developer.mozilla.org/en/The_life_of_an_HTML_HTTP_request
https://developer.mozilla.org/en/Bird's_Eye_View_of_the_Mozilla_Framework
How do I disable css via presentation objects/interfaces? Is this possible? Inside of nsIDocShell there are a few attributes that kind of imply you can disable css via the browsers docshell - allowPlugins, allowJavascript, allowMetaRedirects, allowSubframes, allowImages.
Any suggestions?
Thanks,
Sam
The menu option that disables style sheets uses a function
setStyleDisabled(true)
so you probably can just call this function whenever new browser tab is created. Style sheets are still requested from server, but not applied. This function is not very sophisticated and doesn't mess with nsIRequest, source:
function setStyleDisabled(disabled) {
getMarkupDocumentViewer().authorStyleDisabled = disabled;
}
Digging in Web Developer Toolbar source code I have noticed that their "disable stylesheets" function loops trough all document.styleSheets and sets the disabled property to true, like:
/* if DOM content is loaded */
var sheets = document.styleSheets;
for(var i in sheets){ sheets[i].disabled = true; }
So if the key is to not apply CSS to pages, one of the above solutions should work. But if you really need to stop style sheets from being downloaded from servers, I'm affraid nsIRequest interception is your only option.
Set permissions.default.stylesheet to 2 and voilĂ !
You can actually use the permissions manager to block or allow stylesheets on a host-by-host basis.
Unfortunately there doesn't seem to be a simple flag like allowImages. The bugzilla adding for that is https://bugzilla.mozilla.org/show_bug.cgi?id=340746. You can now vote for it using the new bugzilla voting functionality. You can also add yourself to the CC list to be notified if anyone ever works on it.
A related request is to just give us basic HTML parsing support, which may be what you are trying to do. Unfortunately that isn't supported yet either, but you can vote/track the bugzilla for that at https://bugzilla.mozilla.org/show_bug.cgi?id=102699.
So the only workable solution seems to be some sort of interception as #pawal suggests. Here is a link that talks about the basics of interception to at least get you/us started https://developer.mozilla.org/en/XUL_School/Intercepting_Page_Loads. It lists several options that I list below.
These first few seem to just be at the page/document level so I don't think they help:
Load Events (addEventListener load)
Web Progress Listeners (nsIWebProgressListener) - I tried this approach, it only seems to be called for the page itself, not for content within the page.
Document Loader Service - A global version of nsIWebProgressListener so I think it has the same problem (page level only)
That leaves two others I have not tried yet. They work globally so you would need to filter them to just the browser/pages you care about.
HTTP Observers - Seems like it might work, need to verify it calls back for CSS
Content Policy - Seems like the best option to me since it explicitly is called for CSS, someday I hope to try it :)