Jump to content

Bacos

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

1,643 profile views

Bacos's Achievements

Jr. Member

Jr. Member (3/6)

5

Reputation

  1. Finally solved dudes! You almost hit the point. I did all you suggested and nothing worked, but the key was delete all entries of the table "caches" without delete /site/assets/cache. After that, click refresh button until all modules get included on caches table again. Somehow the host provider messed up something during their updates. Thank you all for the help and suggestions. Now I can sleep very well!
  2. They included other php versions keeping the prior versions. So I keeped the 7.4 version in the control panel.
  3. Now, 3.0.210, updated by replacing wire folder. The problem started at 3.0.184.
  4. 1) I'm not sure about your question, but I can see all files and folders in FTP 2) Yes, the files are there. The missing files on top isn't the problem itself. The main problem is the "unreachable folder" by PW. 3) The erros are about properties inside the modules, that can't be accessed;
  5. I didn't updated PW. Host provider installed PHP 8.x but I'm still in 7.4. I could confirm that with phpinfo.
  6. Hi all, My website stopped working normally after an update in a shared hosting provider. It's not totally stopped because of cached pages! PW not recognize any module in /site/modules folder. Any hints please? I need to sleep again! PS: The hosting provider support have no idea what happened. Thanks!
  7. Hi Sebi, I guess I'm a little confused about phpSession feature. Calling API with curl getting the same problem. Do you have some sample calling API inside a processwire template with route authenticated ? Calling from Postman with JWT works fine. Thank you again!
  8. Additional informations: I believe the AppApi has a bug with PHP Session. I've changed the line 187 in router.php to show the user name logged in and it shows "guest". if (isset($routeParams['auth']) && $routeParams['auth'] === true && !$this->wire('user')->isLoggedIn()) { throw new AppApiException('User does not have authorization ' .$this->wire('user')->name, 401); But running the same command inside a page it shows the real name of logged user. Inside Page user name = 2069008 From API : {"error":"User does not have authorization guest","devmessage":{"class":"ProcessWire\\AppApiException","code":401,"message":"User does not have authorization guest","location":"C:\\xampp\\htdocs\\cinemed\\site\\modules\\AppApi\\classes\\Router.php","line":187} Any help please? Thank you all!
  9. Hi friends, I'm here again with another newbie question, but... I'm getting "failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized" when I try to access API using file_get_contents from PHP page. I'm passing ApiKey (PHP Session) and logged in as superuser. If I remove ["auth"=>true] from routes.php it works. In my mind, if I'm logged in as superuser it should work with authorization enabled or am I wrong? Here is my code... Thank you all! $apiKey = $config->apikey; $getdata = http_build_query( [ 'nome' => 'sample name', 'endereco' => 'sample address' ] ); $context = stream_context_create( [ 'http' => [ 'method' => 'GET', 'header' => ["X-Api-Key: $apiKey", "Content-Type: application/x-www-form-urlencoded"], ], 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ] ); $url_returns = file_get_contents("$url" . $getdata, false, $context);
  10. Hi friends, After running "$pages->parents()->rebuildAll();" in TracyDebugger (PW version 3.0.178), I got table "pages_parents" empty! Any suggestions? has_parent still not working and I really needed it. Thank you all ------ After a lot of tests, I realize that the problem is missing system resources. My database is getting huge and the rebuildAll cannot work properly. I did some tunning in my machine and could run properly. I hope that problem has_parent has finally solved. Thank you anyway!
  11. Thank you very much my friends, The problem was the "api" instead "testeapi/api". Now I'm going to keep studying.
  12. Hi masters, I'm going to make a newbie question, but... I just can't make it work. I've installed a new fresh processwire in xampp, the AppApi module, created an application and keeping the "api" endpoint. But when I run "https://localhost/testeapi/api/test" in Insomnia, I get the standard "404 Page Not Found" instead AppApi error or sucess message. It seems that the AppApi is never being called. The https is correctly configured in xampp. Thank you for any help.
  13. Hi friends ! I'm intend to create a very complex website for a insurance company that will include very complex calculations and validation rules. To achieve this, I've created a global field called "validation (textarea)", where I want to write php scripts for validation in the style Hanna Code. So, every single record that I will save (backend and frontend) should call the validation script before doing that. Is it possible with PW ? Could you help me with a roadmap ? Thank you all ! Bacos
  14. You're welcome ! I think that I found the new instruction : echo $modules->MarkupSocialShareButtons->render(array("theme" => "templates/mythemes/mytheme"); I'm gonna try it !
  15. Hi Soma ! I saw in theme.php file. * Alternatively from the API you can set a theme by using method ->setTheme(themename) * i.e. $modules->MarkupSocialShareButtons->setTheme("round")->render(); * * To create your own create a file with the content of this file somewhere in your site/templates/ folder * This would be a subfolder, and in there a file "theme.php". * * Now you can enter the path relative from "site/templates" in the module config * $modules->MarkupSocialShareButtons->setTheme("mythemes/mytheme")->render(); I guess I misunderstood this instruction !
×
×
  • Create New...