Forum Replies Created
-
AuthorPosts
-
These files are not found.
If it’s going to take longer than a month, please let me know, or share the code blocks with the changes for this.
When is the next release scheduled?
When is the next release scheduled?
I’m having this issue as well. See https://kriesi.at/support/topic/issues-with-style-and-script-merging/#post-1116531
I proposed that they add an option switch to the theme settings that allow the user to turn off and on the SSL verification, in the case of self-signed certs.
@ismael to answer some of your questions:
We are hosting our website on our own internal hardware with VMs running CentOS. We have a Kemp load-balancer between the server and the public. The CentOS server has self-signed certificates for SSL/TLS on it, and the Kemp load-balancer has the domain name certs that get replaced in the exchange passthrough.
This is likely why it the theme fails on its verification of files using wp_remote_get() because it is accessing/referencing itself publicly through our local NAT and not hair-pinning out on the internet and then coming through the Kemp to get the certificates.Your resource regarding this: https://wordpress.stackexchange.com/questions/167898/is-it-safe-to-use-sslverify-true-for-with-wp-remote-get-wp-remote-post#answer-167910 states the following, which I think pretty much sums up what your team should do:
If this is a publicly distributed plugin, then you might want to attach that to a simple option that the user can turn on or off. You could as well try the verified request first and if not (and if the user has opted in for a unsigned request), then switch to a potentially unsafe request.
Your team should add a switch to the settings of the theme, to turn off verifying of the SSL certificates, should we have a setup where load-balancers exist or complicated SSL certificate setups cause these sorts of errors.
- This reply was modified 5 years, 5 months ago by Michael.
Any updates from Enfold support? Seems like the most logical response to this issue.
Ha, their support structure is extremely poor. I inherited this theme for a site I manage, but I would have never used it.
I think wp_remote_get() is failing when the site has a self-signed certificate.
That’s my case exactly as well. I’ve since replaced that function with the native PHP file_get_contents() function in my code with some affordances for ssl/tls scenarios specific to my case and stored it as a recurring patch job in my git repo.
An entry in the Error log as to what is going on would be helpful.
Amongst SO MANY OTHER THINGS.
- This reply was modified 5 years, 5 months ago by Michael.
You should read the documentation, it’s really easy and faster than support here.
Use custom css to do that. There are many tutorials online on how to modify these.
Oh and by the way, you should hire me on contract to fix your theme, or at least discount me.
I see you guys are looking for developers, and it looks like you need all the help you can get.
Contact me at (Email address hidden if logged out) .Thanks.
Well I’ve been looking at the theme code and I am seeing a variable naming conflict and conditional argument that should be refactored here as it is confusing, superfluous and doesn’t really handle the reasons for why the outcome wouldn’t occur in any sort of graceful manner except for failing altogether, especially if we’re going all the way to provide merging and compressing in the first place.
In the following file (/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php:416) I see this block of code:
//create a new file if we got any content if(trim($content) != "") { $file_path = trailingslashit($stylesheet_dir).$data['hash'].".".$file_type; $file_created = avia_backend_create_file($file_path, $content); //double check if the file can be accessed if(is_readable($file_path)) { $handle = fopen($file_path, "r"); $filecontent = fread($handle, filesize($file_path)); fclose( $handle ); $file = $this->get_file_url($data, $file_type); $request = wp_remote_get($file); $file_created = false; if( ( ! $request instanceof WP_Error ) && is_array( $request ) && isset( $request['body'] ) ) { $request['body'] = trim($request['body']); $filecontent = trim($filecontent); //if the content does not match the file is not accessible if($filecontent == $request['body']) { $file_created = true; } } } } //file creation failed if(!$file_created) return false;
If we look at lines 420, we have the variable
$file_created
, which should essentially always returntrue
. Yet we later on line 432 re-assign the same variable $file_created tofalse
, basically overriding the truthful result of the previous $file_created boolean state anyhow, regardless of it being true….???? That is a problem.I also have to ask, why in lines 424 to 444 do we even bother checking to see if the file can be accessed by comparing the local PHP access to the a HTTP GET response??!? If the code successfully generated the file in the earlier step, then the file should be there. It is not the theme’s responsibility to determine HTTP response issues, but most likely a larger problem with the server or redirections, which this entire theme code block attempts to sloppily circumvent, but fails miserably when the problem arises regardless.
At the minimum, barring all of the other code issues, I would change the code to the following:
//create a new file if we got any content if(trim($content) != "") { $file_path = trailingslashit($stylesheet_dir).$data['hash'].".".$file_type; $file_created = avia_backend_create_file($file_path, $content); //double check if the file can be accessed if(is_readable($file_path)) { $handle = fopen($file_path, "r"); $filecontent = fread($handle, filesize($file_path)); fclose( $handle ); $file = $this->get_file_url($data, $file_type); $request = wp_remote_get($file); // don't overwrite the above assignment of the $file_created variable, and remove this assignment: $file_created = false; if( ( ! $request instanceof WP_Error ) && is_array( $request ) && isset( $request['body'] ) ) { $request['body'] = trim($request['body']); $filecontent = trim($filecontent); // if the content does not match, the file is not accessible if($filecontent != $request['body']) // if the file content DOES NOT equal the request body, then.... { $file_created = false; // change from true to false } } } } //file creation failed, exit out of function if(!$file_created) return false;
- This reply was modified 5 years, 7 months ago by Michael.
Hello?
Unfortunately, we’re going to have to work interactively over some sort of chat session as I cannot provide you with access to our public website due to our corporate privacy policies.
Please set up a time that works for you that I can coordinate chat via something like Discord or Skype.
File permissions are:
rwx rwx r-x (775)
user/group: apache apacheWhat’s interesting is that the files end up getting generated.
- This reply was modified 5 years, 7 months ago by Michael.
May 7, 2019 at 6:16 pm in reply to: A non-numeric value encountered: function-set-avia-backend.php line 594 #1098155I already said what I did, but here is the entire code block:
if(!function_exists('avia_backend_merge_colors')) { /** * merges to colors * @param string $color1 hex color code * @param string $color2 hex color code * @return new color */ function avia_backend_merge_colors($color1, $color2) { if(empty($color1)) return $color2; if(empty($color2)) return $color1; $prepend = array("", ""); $colors = array(avia_backend_hex_to_rgb_array($color1), avia_backend_hex_to_rgb_array($color2)); $final = array(); foreach($colors[0] as $key => $color) { if (is_numeric($colors[0][$key]) && is_numeric($colors[1][$key])) { $final[$key] = (int) ceil(($colors[0][$key] + $colors[1][$key]) / 2); } } return avia_backend_get_hex_from_rgb($final[0], $final[1], $final[2]); } }
- This reply was modified 5 years, 7 months ago by Michael.
May 6, 2019 at 5:09 pm in reply to: A non-numeric value encountered: function-set-avia-backend.php line 594 #1097745Hi Rikard,
I know it’s a warning and not a real error. Still, the theme code should not produce this warning as PHP it is not expecting the value type received and by the values in the array provided. The theme code should filter invalid types with some sort of conditional statement, or at the source, the values should be validated before being added or stored in the array or data.
For the time being, I have added a conditional statement around offending line of code reported, checking if the incoming value is actually a number.
May 3, 2019 at 6:01 am in reply to: Magnificent Popup not workin (not recognized as a function) #1096731No worries.
May 2, 2019 at 6:27 pm in reply to: Merge Parent Theme Scripts and Styles But Not Child Theme #1096552Where is the full documentation for this and examples? I want to implement this correctly without a lot of trial and error.
4 YEARS LATER AND STILL NO EXPECTED FEATURE.
This is not a caching issue.
This is a result of the way that the posts are created and stored in the posts tables, there is an almost duplicate version of the code that gets displayed from the ALB, but editing the debug window version does not get respected when saving. Nor does it save when using the Default Editor.
This is a confusing limitation.
It would be best if there was a field in the layout builder options for an element to select a URL for an image instead of having to choose from the Media Library only.
That is what should be solved here in a new feature.
- This reply was modified 5 years, 7 months ago by Michael.
May 1, 2019 at 5:05 pm in reply to: Merge Parent Theme Scripts and Styles But Not Child Theme #1096207Bump.
April 30, 2019 at 5:23 pm in reply to: Magnificent Popup not workin (not recognized as a function) #1095821@Victoria what is the code block that you inserted to load magnificPopup explicitly?
January 3, 2017 at 1:43 am in reply to: mysqli_num_fields() expects parameter 1 to be mysqli_result #728804I’m still getting this error with the theme:
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /var/www/www.smartstartinc.com/public_html/wp-includes/wp-db.php on line 3091
In some cases you may not need to put an echo before the do_shortcode. The following code could be incorrect:
<?php echo do_shortcode( '[bread_crumb]' ); ?>
However, this works in some situations:
<?php $variablename = do_shortcode( '[bread_crumb]' ); ?>
- This reply was modified 8 years, 2 months ago by Michael.
You don’t even know how much time this little trick is going to save me. Thanks a ton!
So it was my own dang fault. Totally missed that. Thanks for the assistance.
View this link on a mobile device and you will see.
Ok, so I got what you are saying here and just used the don’t display footer option and the hide header showing option. Problem here is that now there is a big white space on the mobile device. Can you assist?
Yes I know that, but when I choose that option and view it on a mobile site, it is no longer responsive. Please see the screen shot link below from Google mobile test website. It shows the page running off and is not mobile friendly. If I add the header back, all is fine. I want to be able to have no header and footer AND still be responsive and mobile friendly. See what I am saying?
https://www.smartstartinc.com/ignition-interlock-device/texas/?p=524
Wasn’t even thinking about that. We will go in and change all the hard links to the new location. Thank you.
Thank you for the quick response, I will try out this solution. What about the logo image issue?
-
AuthorPosts