Conversation
supportThe new update is causing a major problem. For some reason, on a desktop, all the pages look like they’re formatted for a phone. When the plugin is deactivated, the pages look normal again. Also, images are not showing. This topic was modified 1 year, 11 months ago by jamminjames .
Hi, that sounds really spooky. Can you send me a link to a page, so that I can have a look a the html source code? Do you use a page builder like Elementor? With Divi I already tested the new version without problems. Please help me find the problem, because without being able to reproduce it myself it seems very difficult for me to find the cause of the behavior.
The website is using the Vantage theme which uses SiteOrigin. I can’t leave the website in that state, but I could activate the plugin temporarily and copy the html source code for you, if you like. Otherwise, we’d have to set a short amount of time for you to inspect it while the plugin is activated, preferably after midnight PST.
The HTML source code of the “scrambled” page and a screenshot of the page would be great. I can than compare it to the “normal” state without the activated plugin. Maybe I find the reason.
Okay, the page (just an example, it’s affecting all pages) is: https://www.ecosacramento.net/about-us/ A screenshot and html file are here . Good luck!
Thanks for the provided data. Can you tell me what settings you used for the plugin? Especially for the presentation section.
I added screenshots for the settings pages.
Same problem… Fatal error : Uncaught TypeError: CryptX\CryptX::cryptXShortcode(): Argument #1 ($content) must be of type ?string, array given, called in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php on line 433 and defined in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/classes/CryptX.php:133 Stack trace: #0 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php(433): CryptX\CryptX->cryptXShortcode(Array, ‘<p>Universit\xC3\xA9 …’, ‘cryptx’) #1 [internal function]: do_shortcode_tag(Array) #2 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(cryptx…’, ‘do_shortcode_ta…’, ‘[cryptx]<p>Univ…’) #3 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/cryptx.php(45): do_shortcode(‘[cryptx]<p>Univ…’) #4 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/themes/ergopix-explore/footer.php(7): encryptx(‘<p>Universit\xC3\xA9 …’) #5 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template.php(810): require_once(‘/home/clients/0…’) #6 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template.php(745): load_template(‘/home/clients/0…’, true, Array) #7 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/general-template.php(92): locate_template(Array, true, true, Array) #8 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/themes/ergopix-explore/front-page.php(264): get_footer() #9 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template-loader.php(106): include(‘/home/clients/0…’) #10 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-blog-header.php(19): require_once(‘/home/clients/0…’) #11 /home/clients/0642860bc6768c67a514349740331c5a/web/index.php(17): require(‘/home/clients/0…’) #12 {main} thrown in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/classes/CryptX.php on line 133 This reply was modified 1 year, 11 months ago by basicweb .
Which PHP version are you using?
PHP Version 8.2.19 And the code is: $content = get_field(“adresse”, “option”); // Advanced Custom Field echo encryptx($content); This reply was modified 1 year, 11 months ago by basicweb .
Ahhh, okay. That helps me. 👍 Give me a little time…….
In case, the field “adresse” is a WYSIWYG
I think I found my error and fixed it in version 3.4.3. I would like to thank you for your great support in troubleshooting 👍 and for your patience with me. If the error is not fixed after all… Round 2 of the code review 🥳
Everything’s OK for me!
Thank you for the feedback and your help to fix the bug 😀
Hey Ralf, there is still an error at PHP 8.1. (V 3.4.3 is installed): AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: encryptx(): Argument #2 ($args) must be of type string, array given, called in… Regards, Ralph
Hi @rweigmann , can you provide some more details? The version of your WordPress? And the whole error message (Please mask all path information above the WordPress directory). Thanks and kind regards, Ralf
Hey Ralf, I get the error only for three of my WordPress instances (all 6.5.4. / PHP 8.1.28). All other PHP 8.1/8.2 instances are OK. Settings for CryptX are “standard”. Cache plugin is disabled. It’s not a theme based problem because in TwentyTwentyFour the error still occurs. PHP message: PHP Fatal error: Uncaught TypeError: CryptX\CryptX::findEmailAddressesInContent(): Argument #1 ($content) must be of type string, null given, called in /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php on line 324 and defined in /xxx.xxx/httpdocs/wp-content/plugins/cryptx/classes/CryptX.php:442\nStack trace:\n#0 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): CryptX\CryptX->findEmailAddressesInContent()\n#1 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#2 /xxx.xxx/httpdocs/wp-includes/formatting.php(3992): apply_filters()\n#3 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): wp_trim_excerpt()\n#4 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#5 /xxx.xxx/httpdocs/wp-includes/post-templat…’ Regards Ralph
Hi. Should be fixed in version 3.4.4.
I’m still getting the same behavior after updating to 3.4.4. Flushed website and browser caches. This reply was modified 1 year, 11 months ago by jamminjames .
Same weird formatting on a desktop. This reply was modified 1 year, 11 months ago by jamminjames .
Sorry, my bad. We had a child function that used the following code, which used to work, to disguise an email address in the footer: echo (function_exists('encryptx'))? encryptx($content, $args) : $content; It stopped working, causing a fatal error. The encryptx function previously accepted an array for the second value, but now wants a string. Once I removed that code, everything was fine.
Same here. But the $args thing is a function that the plugin should provide… See: <?php $content = "name@example.com"; // with this values the link text will be replaced by 'example', otherwise set $args = array(); $args = array( 'alt_linktext' => 'example', 'opt_linktext' => 1 ); echo (function_exists('encryptx'))? encryptx($content, $args) : $content; ?> We need the fix that includes the $args, i can’t change dozens of website because of that…
True, that should not have been changed, it affects what people have previously set up, like on our site. This reply was modified 1 year, 11 months ago by jamminjames . This reply was modified 1 year, 11 months ago by jamminjames .
You are of course right and it was a mistake on my part. I will correct the function as soon as possible so that the old behavior and calling works again. I can only apologize.
The “encryptx” template function has been revised so that it accepts arguments again, as in previous versions. When used in the template using the “encryptx” function, it is now possible to use square brackets for the values. For example: $args = array( ‘alt_linktext’ => ‘[ click here ]’, ‘opt_linktext’ => 1 ); When calling the shortcode directly with arguments containing square brackets in the values, this is not possible due to limitations of WordPress itself and can lead to unpredictable errors. I hope I was able to restore functionality with version 3.4.5 and that I have not introduced any new problems. I am looking forward to your feedback 🥺. Kind regards Ralf
Hi Ralf, the error still occurs (Theme Twenty Twenty-Four, latest version; but only in combination with Yoast SEO): PHP message: PHP Fatal error: Uncaught TypeError: CryptX\CryptX::replaceEmailInContent(): Argument #1 ($content) must be of type string, null given, called in /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php on line 324 and defined in /xxx.xxx/httpdocs/wp-content/plugins/cryptx/classes/CryptX.php:288\nStack trace:\n#0 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): CryptX\CryptX->replaceEmailInContent()\n#1 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#2 /xxx.xxx/httpdocs/wp-includes/formatting.php(3992): apply_filters()\n#3 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): wp_trim_excerpt()\n#4 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#5 /xxx.xxx/httpdocs/wp-includes/post-template.php(434): …’ Regards, Ralph
Can you tell me how you use CryptX here? In the template with the encryptx function, as a shortcode in the Gutenberg editor or just a “normal” email address somewhere in the text? I’m trying to recreate it right now.
As for us, we use it two ways, on the backend, checking the box for a particular page or post, and in the instance that is causing the problems, inserted into the footer via: <?php echo(function_exists('encryptx'))? encryptx($content, $args) : $content; ?> … with the $args array like so: $args = array( 'alt_linktext' => 'office [at] website [dot] net', 'opt_linktext' => 1 ); It is working again, thanks! This reply was modified 1 year, 11 months ago by jamminjames .
critical error again. WTF? Do you test it before you do release an update? That’s really not serious working for a plugin who is installed on 10k+ websites! An error of type E_ERROR was caused in line 44 of the file /wp-content/plugins/cryptx/cryptx.php. Error message: Uncaught ArgumentCountError: Too few arguments to function encryptx(), 1 passed in /wp-content/themes/brisa/footer.php on line 14 and exactly 2 expected in /wp-content/plugins/cryptx/cryptx.php:44 Had to do changes on most of the websites to get it back working with the last version. Now, most of my clients websites are offline, because of your fault. Fix that, or i will talk with my lawyer! This reply was modified 1 year, 11 months ago by foxcom . This reply was modified 1 year, 11 months ago by foxcom .
It do not work with and without the $args… Really anoying… If there will not fix by update today (sunday), will to have to remove your plugin from all of my projects, give you a one star rating, tell my customers to do the same and i’m still thinking about charging you for the effort i will have… i understand that this is a “hobby project” and free of charge, but with so many installations and years of operation, there is also a responsibility on your part to ensure that this does not happen.
Hello @foxcom , I’m obviously sorry about the problems, but as you yourself have discovered, this is just a hobby. And threatening to get a lawyer isn’t helpful either. I’m testing the plugin with a standard installation of WordPress with different PHP versions. But I have to admit that I forgot the test page that calls the function without an argument variable. I’m only human and I don’t get paid for maintaining the plugin, which I do in my free time. I try to help with problems as quickly as possible and am very grateful to users like @jamminjames or @rweigmann who give me constructive support.
Geez, @foxcom , I could see this level of anger if you were paying for the plugin. But anytime you use a free plugin, you are accepting the risk. Thanks for your attention to this matter, Ralf, and for maintaining this free plugin.
I hope I have found and fixed all the errors in advance this time so that version 3.4.5.2 works without any errors. I tested as described above with the current WordPress version, the standard theme and activated debug mode. In all PHP versions tested (7.4, 8.1, 8.2 and 8.3) no errors or warnings appeared in the PHP log file. I pray that I haven’t overlooked anyth...
Hi, that sounds really spooky. Can you send me a link to a page, so that I can have a look a the html source code? Do you use a page builder like Elementor? With Divi I already tested the new version without problems. Please help me find the problem, because without being able to reproduce it myself it seems very difficult for me to find the cause of the behavior.
The website is using the Vantage theme which uses SiteOrigin. I can’t leave the website in that state, but I could activate the plugin temporarily and copy the html source code for you, if you like. Otherwise, we’d have to set a short amount of time for you to inspect it while the plugin is activated, preferably after midnight PST.
The HTML source code of the “scrambled” page and a screenshot of the page would be great. I can than compare it to the “normal” state without the activated plugin. Maybe I find the reason.
Okay, the page (just an example, it’s affecting all pages) is: https://www.ecosacramento.net/about-us/ A screenshot and html file are here . Good luck!
Thanks for the provided data. Can you tell me what settings you used for the plugin? Especially for the presentation section.
I added screenshots for the settings pages.
Same problem… Fatal error : Uncaught TypeError: CryptX\CryptX::cryptXShortcode(): Argument #1 ($content) must be of type ?string, array given, called in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php on line 433 and defined in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/classes/CryptX.php:133 Stack trace: #0 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php(433): CryptX\CryptX->cryptXShortcode(Array, ‘<p>Universit\xC3\xA9 …’, ‘cryptx’) #1 [internal function]: do_shortcode_tag(Array) #2 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/shortcodes.php(273): preg_replace_callback(‘/\\[(\\[?)(cryptx…’, ‘do_shortcode_ta…’, ‘[cryptx]<p>Univ…’) #3 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/cryptx.php(45): do_shortcode(‘[cryptx]<p>Univ…’) #4 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/themes/ergopix-explore/footer.php(7): encryptx(‘<p>Universit\xC3\xA9 …’) #5 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template.php(810): require_once(‘/home/clients/0…’) #6 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template.php(745): load_template(‘/home/clients/0…’, true, Array) #7 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/general-template.php(92): locate_template(Array, true, true, Array) #8 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/themes/ergopix-explore/front-page.php(264): get_footer() #9 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-includes/template-loader.php(106): include(‘/home/clients/0…’) #10 /home/clients/0642860bc6768c67a514349740331c5a/web/wp-blog-header.php(19): require_once(‘/home/clients/0…’) #11 /home/clients/0642860bc6768c67a514349740331c5a/web/index.php(17): require(‘/home/clients/0…’) #12 {main} thrown in /home/clients/0642860bc6768c67a514349740331c5a/web/wp-content/plugins/cryptx/classes/CryptX.php on line 133 This reply was modified 1 year, 11 months ago by basicweb .
Which PHP version are you using?
PHP Version 8.2.19 And the code is: $content = get_field(“adresse”, “option”); // Advanced Custom Field echo encryptx($content); This reply was modified 1 year, 11 months ago by basicweb .
Ahhh, okay. That helps me. 👍 Give me a little time…….
In case, the field “adresse” is a WYSIWYG
I think I found my error and fixed it in version 3.4.3. I would like to thank you for your great support in troubleshooting 👍 and for your patience with me. If the error is not fixed after all… Round 2 of the code review 🥳
Everything’s OK for me!
Thank you for the feedback and your help to fix the bug 😀
Hey Ralf, there is still an error at PHP 8.1. (V 3.4.3 is installed): AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: encryptx(): Argument #2 ($args) must be of type string, array given, called in… Regards, Ralph
Hi @rweigmann , can you provide some more details? The version of your WordPress? And the whole error message (Please mask all path information above the WordPress directory). Thanks and kind regards, Ralf
Hey Ralf, I get the error only for three of my WordPress instances (all 6.5.4. / PHP 8.1.28). All other PHP 8.1/8.2 instances are OK. Settings for CryptX are “standard”. Cache plugin is disabled. It’s not a theme based problem because in TwentyTwentyFour the error still occurs. PHP message: PHP Fatal error: Uncaught TypeError: CryptX\CryptX::findEmailAddressesInContent(): Argument #1 ($content) must be of type string, null given, called in /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php on line 324 and defined in /xxx.xxx/httpdocs/wp-content/plugins/cryptx/classes/CryptX.php:442\nStack trace:\n#0 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): CryptX\CryptX->findEmailAddressesInContent()\n#1 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#2 /xxx.xxx/httpdocs/wp-includes/formatting.php(3992): apply_filters()\n#3 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): wp_trim_excerpt()\n#4 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#5 /xxx.xxx/httpdocs/wp-includes/post-templat…’ Regards Ralph
Hi. Should be fixed in version 3.4.4.
I’m still getting the same behavior after updating to 3.4.4. Flushed website and browser caches. This reply was modified 1 year, 11 months ago by jamminjames .
Same weird formatting on a desktop. This reply was modified 1 year, 11 months ago by jamminjames .
Sorry, my bad. We had a child function that used the following code, which used to work, to disguise an email address in the footer: echo (function_exists('encryptx'))? encryptx($content, $args) : $content; It stopped working, causing a fatal error. The encryptx function previously accepted an array for the second value, but now wants a string. Once I removed that code, everything was fine.
Same here. But the $args thing is a function that the plugin should provide… See: <?php $content = "name@example.com"; // with this values the link text will be replaced by 'example', otherwise set $args = array(); $args = array( 'alt_linktext' => 'example', 'opt_linktext' => 1 ); echo (function_exists('encryptx'))? encryptx($content, $args) : $content; ?> We need the fix that includes the $args, i can’t change dozens of website because of that…
True, that should not have been changed, it affects what people have previously set up, like on our site. This reply was modified 1 year, 11 months ago by jamminjames . This reply was modified 1 year, 11 months ago by jamminjames .
You are of course right and it was a mistake on my part. I will correct the function as soon as possible so that the old behavior and calling works again. I can only apologize.
The “encryptx” template function has been revised so that it accepts arguments again, as in previous versions. When used in the template using the “encryptx” function, it is now possible to use square brackets for the values. For example: $args = array( ‘alt_linktext’ => ‘[ click here ]’, ‘opt_linktext’ => 1 ); When calling the shortcode directly with arguments containing square brackets in the values, this is not possible due to limitations of WordPress itself and can lead to unpredictable errors. I hope I was able to restore functionality with version 3.4.5 and that I have not introduced any new problems. I am looking forward to your feedback 🥺. Kind regards Ralf
Hi Ralf, the error still occurs (Theme Twenty Twenty-Four, latest version; but only in combination with Yoast SEO): PHP message: PHP Fatal error: Uncaught TypeError: CryptX\CryptX::replaceEmailInContent(): Argument #1 ($content) must be of type string, null given, called in /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php on line 324 and defined in /xxx.xxx/httpdocs/wp-content/plugins/cryptx/classes/CryptX.php:288\nStack trace:\n#0 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): CryptX\CryptX->replaceEmailInContent()\n#1 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#2 /xxx.xxx/httpdocs/wp-includes/formatting.php(3992): apply_filters()\n#3 /xxx.xxx/httpdocs/wp-includes/class-wp-hook.php(324): wp_trim_excerpt()\n#4 /xxx.xxx/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters()\n#5 /xxx.xxx/httpdocs/wp-includes/post-template.php(434): …’ Regards, Ralph
Can you tell me how you use CryptX here? In the template with the encryptx function, as a shortcode in the Gutenberg editor or just a “normal” email address somewhere in the text? I’m trying to recreate it right now.
As for us, we use it two ways, on the backend, checking the box for a particular page or post, and in the instance that is causing the problems, inserted into the footer via: <?php echo(function_exists('encryptx'))? encryptx($content, $args) : $content; ?> … with the $args array like so: $args = array( 'alt_linktext' => 'office [at] website [dot] net', 'opt_linktext' => 1 ); It is working again, thanks! This reply was modified 1 year, 11 months ago by jamminjames .
critical error again. WTF? Do you test it before you do release an update? That’s really not serious working for a plugin who is installed on 10k+ websites! An error of type E_ERROR was caused in line 44 of the file /wp-content/plugins/cryptx/cryptx.php. Error message: Uncaught ArgumentCountError: Too few arguments to function encryptx(), 1 passed in /wp-content/themes/brisa/footer.php on line 14 and exactly 2 expected in /wp-content/plugins/cryptx/cryptx.php:44 Had to do changes on most of the websites to get it back working with the last version. Now, most of my clients websites are offline, because of your fault. Fix that, or i will talk with my lawyer! This reply was modified 1 year, 11 months ago by foxcom . This reply was modified 1 year, 11 months ago by foxcom .
It do not work with and without the $args… Really anoying… If there will not fix by update today (sunday), will to have to remove your plugin from all of my projects, give you a one star rating, tell my customers to do the same and i’m still thinking about charging you for the effort i will have… i understand that this is a “hobby project” and free of charge, but with so many installations and years of operation, there is also a responsibility on your part to ensure that this does not happen.
Hello @foxcom , I’m obviously sorry about the problems, but as you yourself have discovered, this is just a hobby. And threatening to get a lawyer isn’t helpful either. I’m testing the plugin with a standard installation of WordPress with different PHP versions. But I have to admit that I forgot the test page that calls the function without an argument variable. I’m only human and I don’t get paid for maintaining the plugin, which I do in my free time. I try to help with problems as quickly as possible and am very grateful to users like @jamminjames or @rweigmann who give me constructive support.
Geez, @foxcom , I could see this level of anger if you were paying for the plugin. But anytime you use a free plugin, you are accepting the risk. Thanks for your attention to this matter, Ralf, and for maintaining this free plugin.
I hope I have found and fixed all the errors in advance this time so that version 3.4.5.2 works without any errors. I tested as described above with the current WordPress version, the standard theme and activated debug mode. In all PHP versions tested (7.4, 8.1, 8.2 and 8.3) no errors or warnings appeared in the PHP log file. I pray that I haven’t overlooked anything this time.
It was a “hard birth”, but in the end everything turned out well. I learned a lot in the process and can only thank you for your patience. 👍