Processwire CMS variables are not being recognized

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Processwire CMS variables are not being recognized

Postby Javon » June 14th, 2018, 9:31 am

Hello

I'm developing a website using the CMS Processwire (https://processwire.com/). PHP Tools is propely installed an configurated, I can add hold-points in simple php sites.

But it does not recognize any of the processwire own variables.
I imported all website files into my PHP-Project, there is nothing missing. I'm not sure if I have to do some additional configuration.

Can anybody help me?

The Notices/Errors:
- Notice: Undefined variable: page in C:\xampp\htdocs\gs-neu01\site\templates\home.php on line 26

- ( ! ) Fatal error: Uncaught Error: Call to a member function get() on null in C:\xampp\htdocs\gs-neu01\site\templates\home.php on line 40
Javon
 
Posts: 2
Joined: June 14th, 2018, 9:21 am

Re: Processwire CMS variables are not being recognized

Postby Miloslav Beno » June 21st, 2018, 8:47 am

Hello,

That just seems the project is incorrectly configured. I imagine if you have all the files included in the project you can see all the intellisense, but when you run it PHP throws exceptions you've provided.

I don't know the processwire, but I would check their guide how to configure it https://webdesign.tutsplus.com/tutorials/how-to-install-and-setup-processwire-cms--cms-25509. The best bet will be to use Apache as they do in the tutorial.

Then when everything is setup on the server side, you would go to php tools, Project properties ( right click on the project node in Solution explorer), Server tab and select Custom. You will need to fill the url of the project - that should work.

By default php tools tries to run it with just php build-in server and just by looking at the beggining of the tutorial processwire requires mod_rewrite which is not present in php build-in server.

Please let me know how if that helped.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Processwire CMS variables are not being recognized

Postby Javon » June 25th, 2018, 9:10 am

Hello Miroslav

Thank your for your reply, it is working now. I switched the Web Server to "custom" instead of "IIS Express" which I used before.
Javon
 
Posts: 2
Joined: June 14th, 2018, 9:21 am

Re: Processwire CMS variables are not being recognized

Postby Miloslav Beno » June 26th, 2018, 7:55 am

Great! I'm glad it's working!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 6 guests

cron

User Control Panel

Login

Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 5 minutes)
Most users ever online was 151 on December 6th, 2020, 7:46 am

Users browsing this forum: No registered users and 6 guests