Jürgen
Forum Replies Created
-
Forum: Plugins
In reply to: [Germanized for WooCommerce] Theme Neve – Inkompatibilit?t mit GermanizedAhhh… super… das hat mir enorm weiter geholfen.
Vielen Dank ??
beste Grü?e
Jürgen
Forum: Plugins
In reply to: [Germanized for WooCommerce] Theme Neve – Inkompatibilit?t mit Germanizeddas ist noch ein Classic-Theme und nutzt Elementor, wobei ich aber schon mit dem Block-Editor arbeite, soweit das zumindest m?glich ist (theme-supports)
über diesen Link kommst du auf meine Staging Shop Seite
Ich kl?re aber parallel auch gerade mit meinem Theme-Anbieter, wie ich das Problem l?sen kann, aber es ist nicht so einfach, denen das zu erkl?ren :-). Wie es aussieht, überschreibt das Theme die Standard-Templates, weshalb die woo-Hooks nicht mehr funktionieren, die an dieser Stelle normalerweise aufgerufen werden (woocommerce_(before|after)_shop_loop_item_title)
Forum: Plugins
In reply to: [Germanized for WooCommerce] Internal errorHallo Vendidero… tut mir Leid, ich war mir nicht sicher, da der Titel (Internal Error) ja ganz gut gepasst hat, hab ich mein Problem einfach dazu getan… beim n?chsten mal separiere ich das ??
Ich konnte das Problem inzwischen selber l?sen. Da das hier sonst niemand gemeldet hat, musste das ja an meiner Installation liegen. Mir haben da noch ein paar PHP-Module gefehlt… nachdem ich die installiert habe, konnte ich das Update ohne Fehler ausführen ??
Forum: Plugins
In reply to: [Germanized for WooCommerce] Internal errorIch bin seit ein paar Tagen dabei, WC und WCG einzurichten und auszuprobieren. Gestern kam für Germanized ein Update auf die Version 3.15.0. Als ich das Plugin aktualisiert habe, war die Site aufgrund eines Critical-Errors (500) nicht mehr erreichbar.
[09:17:00] [GET] [1063ms] /wp-json/real-queue/v1/status; {"code":"internal_server_error","message":" Es gab einen kritischen Fehler auf deiner Website. Erfahre mehr über die Problembehandlung in WordPress. ","data":{"status":500},"additional_errors":[]}
Im Server-Log finde ich dazu folgenden Eintrag:
PHP Fatal error: Uncaught Error: Class "DOMDocument" not found in /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/vendor/wsdltophp/wssecurity/src/Element.php:280\nStack trace:\n#0 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/vendor/wsdltophp/wssecurity/src/WsSecurity.php(90): WsdlToPhp\\WsSecurity\\Element->toSend()\n#1 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-dhl/src/Api/ImProductsSoap.php(25): WsdlToPhp\\WsSecurity\\WsSecurity::createWsSecuritySoapHeader()\n#2 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-dhl/src/Api/ImProductsSoap.php(21): Vendidero\\Germanized\\DHL\\Api\\ImProductsSoap->get_headers()\n#3 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-dhl/src/Api/ImProductList.php(319): Vendidero\\Germanized\\DHL\\Api\\ImProductsSoap->__construct()\n#4 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-dhl/src/ShippingProvider/DeutschePost.php(304): Vendidero\\Germanized\\DHL\\Api\\ImProductList->update()\n#5 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Simple.php(1171): Vendidero\\Germanized\\DHL\\ShippingProvider\\DeutschePost->register_products()\n#6 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Auto.php(420): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Simple->get_products()\n#7 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Auto.php(356): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Auto->get_label_settings_by_zone()\n#8 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Auto.php(384): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Auto->get_label_settings_by_shipment_type()\n#9 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-dhl/src/ShippingProvider/DeutschePost.php(109): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Auto->get_config_set_simple_label_settings()\n#10 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Simple.php(1014): Vendidero\\Germanized\\DHL\\ShippingProvider\\DeutschePost->get_config_set_simple_label_settings()\n#11 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Simple.php(1115): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Simple->get_settings()\n#12 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/ShippingProvider/Simple.php(575): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Simple->get_all_settings()\n#13 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/Install.php(229): Vendidero\\Germanized\\Shipments\\ShippingProvider\\Simple->update_settings_with_defaults()\n#14 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/Install.php(29): Vendidero\\Germanized\\Shipments\\Install::update_providers()\n#15 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/Package.php(408): Vendidero\\Germanized\\Shipments\\Install::install()\n#16 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/packages/woocommerce-germanized-shipments/src/Package.php(413): Vendidero\\Germanized\\Shipments\\Package::install()\n#17 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/includes/class-wc-gzd-install.php(316): Vendidero\\Germanized\\Shipments\\Package::install_integration()\n#18 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/includes/class-wc-gzd-install.php(204): WC_GZD_Install::install_packages()\n#19 /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/includes/class-wc-gzd-install.php(146): WC_GZD_Install::install()\n#20 /var/www/vhosts/stg.trimension.de/wordpress/wp-includes/class-wp-hook.php(324): WC_GZD_Install::check_version()\n#21 /var/www/vhosts/stg.trimension.de/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()\n#22 /var/www/vhosts/stg.trimension.de/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action()\n#23 /var/www/vhosts/stg.trimension.de/wordpress/wp-settings.php(643): do_action()\n#24 /var/www/vhosts/stg.trimension.de/wp-config.php(54): require_once('...')\n#25 /var/www/vhosts/stg.trimension.de/wordpress/wp-load.php(55): require_once('...')\n#26 /var/www/vhosts/stg.trimension.de/wordpress/wp-admin/admin.php(34): require_once('...')\n#27 /var/www/vhosts/stg.trimension.de/wordpress/wp-admin/site-health.php(10): require_once('...')\n#28 {main}\n thrown in /var/www/vhosts/stg.trimension.de/wordpress/wp-content/plugins/woocommerce-germanized/vendor/wsdltophp/wssecurity/src/Element.php on line 280, referer: https://stg.trimension.de/wp-admin/plugins.php
Leider ist nach der Aktualisierung kein Zugriff mehr auf das Backend m?glich, weshalb ich keine weiteren Informationen habe… Nach dem Zurückrollen auf die Version 3.14.1 war alles wieder in Ordnung
WordPress 6.4.1
PHP: 8.2.7
Server: Debian 12 / Apache Webserver
Theme: Neve + Child-ThemeI logged in with a different IP (dynamically allocated by provider) and therefore its solved. I guess that the ip-blocking will be released after 60 minutes, …
delete browser cache, cookies and wp cache does not help. Seems that my IP has blocked. Is there a way to release it?
Forum: Plugins
In reply to: [Gutenberg] Block-Support “Color” unable to set Style-SettingsHello… thank you very much for the tip… but unfortunately it doesn’t help here…
There are a lot of tricky problems in the gutenberg block programming… The documentation is very superficial and incomplete and unfortunately not up to date in many places… When I analyze the code of working core blocks, I have to realize that a lot of undocumented functions are used there.
This is very frustrating and makes getting started with block programming a horror trip, even for professionals…
It seems to me that several of my topics have been merged in this thread… I’ll just close the thread because I’ve been able to solve a lot of problems myself in the meantime…
Forum: Plugins
In reply to: [Gutenberg] Block-Support “Color” unable to set Style-Settingsand there is also another Problem… When I define Block-Support for Colors:
"supports": { "color": true },
i can choose the color with the “normal” Picker which allows custom colors and also all available Palettes. The resulting Color-Settings are coded within the Block-Props as classNames and styles for the Block-Container-Tag.
But when I want the color to be set to another Tag within the Container, I have to separate the color settings out of the BlockProps, because most of the Classes are to be set correctly to the Block-Container, but the Colors for Example should be set to the inner Tag. Thats very difficult, because when I set a color from a palette, the this color setting is found within the style prop and also as special Classes like ‘has-green-text-color’ or ‘has-red-background-color’
The useColorProps-Hook gives me the extracted color-Information which I can use for the inner Tag, but the has-xxx classes are still present within the Block-Props className property which sets the colors also to the Block container
Therefore I realized it as follows:
const { style, className, ...blockProps } = useBlockProps(); const containerClass = !!className ? className.replace(/has-.* /g, '') : ''; const borderProps = useBorderProps(attributes); const colorProps = useColorProps(attributes); const spacingProps = useSpacingProps(attributes); const typegraphyProps = useTypographyProps(attributes); const innerClass = classnames([borderProps.className, colorProps.className, spacingProps.className, typegraphyProps.className, 'tbx-math-box-content']); const innerStyle = { ...borderProps.style, ...colorProps.style, ...spacingProps.style, ...typegraphyProps.style };
It works, but it’s very unpleasant… but I haven’t found a solution
<figure {...blockProps} className={containerClass}> <div> <math className={innerClass} style={innerStyle} dangerouslySetInnerHTML={{ __html: attributes.content }} /> </div> )}
Forum: Plugins
In reply to: [Gutenberg] Block-Support “Color” unable to set Style-SettingsI have revised the code several times in the meantime and found finally other solutions.
As far as I remember, it’s very simple…
I work with the standard WordPress development environment: Docker and wp-env and use the code according to the examples in the component description.
ColorPicker: (https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/color-picker)
import { useState } from 'react'; import { ColorPicker } from '@wordpress/components'; function Example() { const [color, setColor] = useState(); return ( <ColorPicker color={color} onChange={setColor} enableAlpha defaultValue="#000" /> ); }
In this example I see the Control and can manually select a color, but no palettes are displayed.
ColorPalette:
(https://github.com/WordPress/gutenberg/tree/trunk/packages/components/src/color-palette)
import { useState } from 'react'; import { ColorPalette } from '@wordpress/components'; const MyColorPalette = () => { const [ color, setColor ] = useState ( '#f00' ) const colors = [ { name: 'red', color: '#f00' }, { name: 'white', color: '#fff' }, { name: 'blue', color: '#00f' }, ]; return ( <ColorPalette colors={ colors } value={ color } onChange={ ( color ) => setColor( color ) } /> ); } );
The colors-prop is not required. When omit, then there are no palettes be shown and I cannot find any Information about, what I need to do so that this component offers the standard palettes ‘DEFAULT’ and ‘THEME’ for color selection.
- This reply was modified 1 year, 1 month ago by Jürgen.
Forum: Developing with WordPress
In reply to: ColorPicker and ColorPalettesBy chance I found another – unfortunately undocumented – variant.
In the ‘@wordpress/block-editor’ module there is a component called ‘PanelColorSettings’. This creates a panel in the sidebar and the correspondingly configured color setting controls.
This component does exactly what you expect here. It’s just a shame that you can’t find it… and that there’s no documentation about it…
The whole framework is totally chaotic… there is no clear line and everything is constantly changing… Does anyone even see through it?
Forum: Developing with WordPress
In reply to: Toolbar, AlignmentToolbar, ToolbarGroup, ToolbarButton…I also know this page, but it doesn’t answer my questions. Depending on the block, a “default” toolbar always appears with different groups, sections and controls… the page provides a number of code-examples of how I can expand this toolbar, but no explanation…
For example, what is the alignment toolbar? You won’t find any documentation for this. Is that just a button? or a group with a button? What parameters does this thing have? how can I specify where this button appears in the toolbar?
If I define my own control-sets for my block, how can I determine whether they should be added to an existing group or whether a separate group should be created for them… and where this should then appear in the toolbar?
BTW: is the ToolbarGroup the same as the Section? Defines a ToolbarGroup exactly one Section separated by a vertical separator?
I can group my elements into ToolbarGroups. They have a “group” attribute. What’s it all about? Is this a unique ID of a group? What happens if I don’t set this? Are there special strings that I have to use for the group-attribute?
Questions upon questions… sorry, but the documentary is simply too superficial and sometimes incomprehensible…
Forum: Developing with WordPress
In reply to: Gutenberg Development – Need HelpThank you very much… that explains everything… I can’t see any logic behind hiding the controls, but at least now I know that I have correctly understood what works and what doesn’t work ??
Forum: Developing with WordPress
In reply to: Gutenberg Development – Need Helpyou’re right, sorry… I was a little frustrated after two weeks evaluating.
Finally I found a solution and immediately ran into the next problem.
The idea was to allow the user to set a border for the block using the sidebar control (color, style, thickness, radius). The currently experimental block support works and does what I expect. The same applies to setting padding and margin-spacings…
"supports": { "align": true, "anchor": true, ... "spacing": { "margin": true, "padding": true, }, "__experimentalBorder": { "radius": true, "color": true, "width": true, "style": true, } }, ... const borderProps = useBorderProps(attributes); const spacingProps = useSpacingProps(attributes);
But this doesn’t seem to work in every theme. I use the Neve theme in the purchased version, where the corresponding controls are simply missing from my blocks, and I found, that this is not a problem of my blocks… All Core-Blocks does not have the Border- and Spacing-Controls with Neve activated.
So I found out that some theme support settings are necessary to activate these controls…
add_theme_support('appearance-tools'); add_theme_support('border'); add_theme_support('custom-spacing');
So I created a child theme to set these theme supports, which actually helped. The controls are now available on all blocks using these settings. I’m currently checking with the theme manufacturer to see whether this could cause conflicts with the original theme.
The Neve-Theme (from Themeisle) is still a classic-theme without theme.json… Therefore, I could of course also store a theme.json in my child theme… but I have no idea what effects that will have on the theme and my site (side effects, etc…)
But unfortunately there is still another problem with the theme_settings, because with the “custom-spacings” I only get the padding settings. The margin settings are still missing
- This reply was modified 1 year, 1 month ago by Jürgen.
Forum: Developing with WordPress
In reply to: Gutenberg Development – Need HelpHi there… and thank you very much for the information… I know the block editor manual… it is very helpful, but unfortunately also very, very superficial.
The problem is that there is no description anywhere on how to do certain things… e.g. I want to be able to put a border on my block… how do I do that?
I’ve found “experimental” block support features that work quite well, but there’s also a BorderControl component and a BorderBoxControl component… what are they for? And I had to laboriously find out that there is a theme support “border” that has to be active for this to work… at least that’s not described anywhere
I have to laboriously find a lot of things on Github by analyzing the code of the core blocks…
Forum: Plugins
In reply to: [Gutenberg] Block-Support “Color” unable to set Style-SettingsThe behavior is also inconsistent:
If I choose a color from the palette, corresponding classes are set in the BlockProps (className) and the elements ‘textColor’ and backgroundColor’ can be found in the Attributes!
However, if I select a color individually, no classes are set in the block props and the two attributes are then also missing. The color entries can then be found in attributes.style.color.(text|background)This chaos can perhaps still be managed, but if the colors are not to be set on the block container but on a component within the block, then the color classes must be removed from the container! Right?!