Skip Navigation

[Resolved] Toolset code errors

This support ticket is created 7 years, 11 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 7 replies, has 2 voices.

Last updated by Minesh 7 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#414475

Hi guys,

I've found some errors in the code that need your attention.

First:
cred-frontend-editor/embedded/toolset/toolset-common/toolset-forms/classes/submit.php:
types-access/toolset/toolset-common/toolset-forms/classes/submit.php:
types/library/toolset/toolset-common/toolset-forms/classes/submit.php:
wp-views/embedded/toolset/toolset-common/toolset-forms/classes/submit.php:

These files are trying to set php.ini directives first of which is

@ini_set('upload_max_size', '64M');

Think this is wrong (Could not test it). The name of the directive is

upload_max_filesize

Check here: hidden link

Second:
There are times when we need to get the root WP directory.
Currently, all functions trying to do this are assuming that we use the default WordPress structure, like this:

wordpress/
--> wp-admin/
--> wp-content/
--> wp-includes/
--> index.php
--> wp-blog-header.php
--> wp-load.php
--> ...

But that is not always the case and I'm pretty sure I'm not the only one using a WordPress boilerplate like Bedrock (hidden link).
But then comes the problem with getting the root WP directory because the structure is changed to:

bedrock-project/
--> config/
--> vendor/
--> web/
----> app/ (this is the wp-content)
------> plugins/
------> themes/
------> uploads/
----> wp/ (this is the WP root)
------> wp-admin/
------> wp-content/ (contains the default WP themes)
------> wp-includes/
------> index.php
------> wp-blog-header.php
------> wp-load.php
------> ...
----> index.php (redirecting to wp/wp-blog-header.php)

bedrock-project/web/app - That is the content directory. This is where you put all your new code and stuff. WP_CONTENT_DIR constant points here.
bedrock-project/web/wp - This is the WP root directory. Basically, you never have to edit anything in this directory as it gets overwritten with every WP update. ABSPATH constant points here.

Hope this info helps you in fixing this as soon as possible.

Regards,
Jordan

#414603

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to thank you for reporting both the issue.

I'll escalate it to our next level support and they will get in touch with you as soon as possible.

#415518

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I would like to have additional information about your custom directory structure.

I would like to know where you would like to implement such custom directory structure and is there any specific reason behind that because I'm assuming that different client have different directory structure.

Could you please confirm that the folder structure customization you are using is done using following the WordPress methods:
=> https://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

Could you please provide these additional information.

#415739

Actually, it's more like WordPress in its own subdirectory:
https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Moving_a_Root_install_to_its_own_directory

The organization of Bedrock is similar to putting WordPress in its own subdirectory but with some improvements.
More information here:
hidden link

I am sure your DEV team knows what Bedrock WordPress Boilerplate is. Or, they shouldn't call themselves wp developers if they haven't.

Tell me if you need more information on this matter.
And, you really should check the link I post for second time in here already and a few more in another threads.
hidden link

Regards,
Jordan

#415772

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing the information.

We all are aware of the possibility to put WordPress on its own director and we should be fully compatible with that out of the box. It does not matter if the specific file structure is using Bedrock, or another one. Our QAs used to do testing with custom directory structures in the past.

if you find any issue with bedrock or custom directory structure (WordPress in its own subdirectory), we need error log in order to track the issue and find what is going wrong there.
Could you please provide proper error log so we can identify the issue after reviewing it.

I have set the next reply to private which means only you and I have access to it.

#416284

OK, here's an example. CRED form with custom post upload field. I try to upload something and I get "Upload failed!". There are no errors in the debug.log.
However I've tracked the problem and its here:

cred-frontend-editor/embedded/toolset/toolset-common/toolset-forms/classes/submit.php

And this is how I temporary fixed it:

 
function get_root_path() {
-    return find_wp_config_path();
+   return find_wp_config_path() . 'wp/';
}

I can see wp-views also have this same file. But so far everything works with Views (or I haven't made any Ajax call, yet).

#416530

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing this information. I'll pass this to our concerns department. I hope other functionality working well and if not please report with proper debug log so we can track the error.

#416585

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I have good new that the issue you reported with "image upload" with your custom directory structure is fixed with our develop branch and fix will be shipped with next release of CRED.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.