Create Rooms
-
The Room-admin page when click on create a new room doesn’t display anything.
Could you please help and guide me on what the problem is about.
I can create everything except from rooms
-
In the root folder of WordPress can you find the wp-config.php file and change this line:
define(‘WP_DEBUG’, false);
to:
define(‘WP_DEBUG’, false);
This turns on error reporting. If you can do this, can you try again and see if there is an error?
Also, have you set up any branches?
What version are you using?
The error message is the following:
Parse error: syntax error, unexpected ‘}’ in /var/www/html/wp-content/plugins/book-a-room/templates/rooms/edit.php on line 62
Deleting the } character the form opens but the code doesn’t list the branches.
The error message is:
Notice:Undefined variable in val in /var/www/html/wp-content/plugins/book-a-room/templates/rooms/edit.php on line 60.The version is WordPress 4.8.1 and the latest plugin.
Thank you
I’m not sure if this fixes it, but I just put up a small version update.
I went through and added a space after the parentheses in some of the code. See if this new update helps.
Also, do you know what version of PHP you are running?
Hi thanks for the support. It seems that the update didn’t fixed the problem. My PHP version is 5.4.16
Did you try it after turning on the error reporting?
I see I said change it and didn’t put a change. It should temporarily change to:
define(‘WP_DEBUG’, true);
Then try it again and let me know if you get any errors.
Hi the problem now is
Parse error: syntax error, unexpected ‘}’ in /var/www/html/wp-content/plugins/book-a-room/templates/rooms/edit.php on line 62If i delete the } character the room page opens to create a new room but in the branches drop down list i get the same error Notice:Undefined variable in val in /var/www/html/wp-content/plugins/book-a-room/templates/rooms/edit.php on line 60.
Deleting the character isn’t the fix, as it needs to close the foreach loop in line 56:
foreach ( $branchList as $key => $val ) {I’ve gone over this code several times and can’t find why this isn’t working. I can’t find the error or recreate it on my end. I’m going to ask on our Facebook page if anyone else has seen this problem.
Was this a new install or an upgrade?
Are you hosting on Windows IIS or Apache?You have created branches, correct? At least one?
Yes of course
Was this an upgrade or a fresh install? If fresh, can you remove it completely and try installing again?
I can’t seem to recreate this problem on my test machine!
I have remove it and the same problem exists. I believe that it has something with the version of PHP may be the syntax cannot recognize the parameter $val
The problem is that there is a missing php inside just before foreach. I changed it to
<?php
foreach ( $branchList as $key => $val ) {
$temp = $branch_line;It now works as expected
The topic ‘Create Rooms’ is closed to new replies.