We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Forum - Search function displays 500 Internal Server error | Forum

Hennesen
Hennesen Jul 10 '19

Hello everyone,


I am running a website with Oxwall and all is fine except for the search function (Standard Forum Module). When someone uses the search function, the page displays the following error:








Error details: Type: Exception Message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'rows' at line 23 File: /home/npccneta/public_html/portal/ow_core/database.php Line: 723 Trace: #0 /home/npccneta/public_html/portal/ow_core/database.php(723): PDOStatement->execute() #1 /home/npccneta/public_html/portal/ow_core/database.php(385): OW_Database->execute('\r\n S...', Array) #2 /home/npccneta/public_html/portal/ow_system_plugins/base/bol/search_entity_dao.php(387): OW_Database->queryForRow('\r\n S...', Array) #3 /home/npccneta/public_html/portal/ow_system_plugins/base/classes/mysql_search_storage.php(277): BOL_SearchEntityDao->findEntitiesCountByText('photos', Array, 0, 0) #4 /home/npccneta/public_html/portal/ow_core/text_search_manager.php(303): BASE_CLASS_MysqlSearchStorage->searchEntitiesCount('photos', Array, 0, 0) #5 /home/npccneta/public_html/portal/ow_plugins/forum/bol/text_search_service.php(285): OW_TextSearchManager->searchEntitiesCount('photos', Array) #6 /home/npccneta/public_html/portal/ow_plugins/forum/bol/forum_service.php(1924): FORUM_BOL_TextSearchService->countGlobalTopics('photos', NULL) #7 /home/npccneta/public_html/portal/ow_plugins/forum/controllers/search.php(472): FORUM_BOL_ForumService->countGlobalTopics('photos', NULL) #8 /home/npccneta/public_html/portal/ow_plugins/forum/controllers/search.php(66): FORUM_CTRL_Search->searchEntities(Array, 'global') #9 [internal function]: FORUM_CTRL_Search->inForums(Array) #10 /home/npccneta/public_html/portal/ow_core/request_handler.php(250): ReflectionMethod->invokeArgs(Object(FORUM_CTRL_Search), Array) #11 /home/npccneta/public_html/portal/ow_core/request_handler.php(226): OW_RequestHandler->processControllerAction(Object(ReflectionMethod), Object(FORUM_CTRL_Search)) #12 /home/npccneta/public_html/portal/ow_core/application.php(346): OW_RequestHandler->dispatch() #13 /home/npccneta/public_html/portal/index.php(76): OW_Application->handleRequest() #14 {main}


I am running a couple of other websites with Oxwall and never experienced this problem. Grateful for any suggestions people might have.


Thank you.

Catkin
Catkin Jul 10 '19
Enable Dev mode and screenshot the page then with more information
Hennesen
Hennesen Jul 10 '19
Thanks for your quick reply. Please see the attached screenshot.
Attachments:
  debug.PNG (59Kb)
Catkin
Catkin Jul 11 '19
So looks like it's a SQL error in the Forum plugin?


Can't say more than that. Someone else should be able to solve the error itself 

Patricia Zorrilla Leader
Patricia Zorrilla Jul 11 '19

Edit the ow_system_plugins / base / bol / search_entity_dao.php file

on line 415 insert the code that I show in the image

Put the web in DEBUG mode https://wiki.oxwall.com/plugin-tuts:enable-debug

Reproduce the problem and take a screenshot.

Undo the changes in the file

Enter the web to register the changes in this file

Turn off the DEBUG mode

Put us here the screenshot, to see if we can help you


Hennesen
Hennesen Jul 11 '19

Hi,


Thanks for your reply. I followed your instructions and got the following message (see screenshot).


Thanks again for your help.

Attachments:
  Error_Message_2.PNG (18Kb)
Patricia Zorrilla Leader
Patricia Zorrilla Jul 12 '19

It is a complex sql query that searches based on what other tables return.

It is not a code error but there is some record in an incorrect table.

You would have to access the database to execute these queries individually and note that each one returns to find the problem.

Maybe other people can think of other methods to solve this without deleting contents of the forum, but without being able to access the database I can not think of how to do it.


Hennesen
Hennesen Jul 15 '19

Hi Patricia,


Thanks for your response. Ok, I'll give it a go, database stuff is not my stronghold unfortunately but I'll see how I go. Any other hints and tricks more than welcome. Thanks.

sijiv31759
sijiv31759 Mar 10 '22
It's a superior strategies notably to help you the a newcomer to blogosphere, summary and even legitimate information… Bless you designed for writing this town. Required browse guide. check blacklisted domain
Nikita
Nikita Mar 14 '22
❤️ Hamirpur Escort ❤️ Kangra Escort ❤️ Kinnaur Escort ❤️ Kullu Escort ❤️ Shimla Escort ❤️ Agra Escort ❤️ Allahabad Escort ❤️ Bareilly Escort ❤️ Bijnor Escort ❤️ Lucknow Escort ❤️ Gorakhpur Escort ❤️ Mathura Escort ❤️ Varanasi Escort ❤️ Patna Escort ❤️ Buxar Escort ❤️ Darbhanga Escort ❤️ Gaya Escort ❤️ Rohtas Escort ❤️ Beawar Escort ❤️ Kishangarh Escort ❤️ Nasirabad Escort ❤️ Pushkar Escort ❤️ Agar Malwa Escort ❤️ Bhadrak Escort ❤️ Bhiwani Escort ❤️ Bidar Escort ❤️ Dhamtari Escort ❤️ Dharmapuri Escort ❤️ East Siang Escort ❤️ Hailakandi Escort ❤️ Jajpur Escort ❤️ Nellore Escort ❤️ Ratnagiri Escort ❤️ Rewari Escort ❤️ Saharanpur Escort ❤️ Seelampur Escort ❤️ Shillong Escort ❤️ Shi Yomi Escort ❤️ Ukhrul Escort ❤️ Vijayapura Escort ❤️ West Siang Escort ❤️ Ahmednagar Escort ❤️ Amritsar Escort ❤️ Anantapur Escorts❤️ Dakshina Kannada Escort ❤️ Jamtara Escort ❤️ Kabirdham Escort ❤️ Pathanamthitta Escort ❤️ Portblair Escort ❤️ Rajnandgaon Escort ❤️ Surendranagar Escort ❤️ Vaishali Escort ❤️ Birbhum Escort ❤️ Chamoli Escort ❤️ Hapur Escort ❤️ Kanjhawala Escort ❤️ Kiphire Escort ❤️ Kupwara Escort ❤️ Shivamogga Escort ❤️ Almora Escort ❤️ Bargarh Escort ❤️ Ludhiana Escort ❤️ Gumla Escort ❤️ Mau Escort ❤️ Vellore Escort ❤️ Pauri Garhwal Escort ❤️ Cachar Escort ❤️ Darjeeling Escort ❤️ Geyzing Escort ❤️ Rudraprayag Escort ❤️ Bhagalpur Escort ❤️ Bhojpur Escort ❤️ Bijapur Escort ❤️ Dhanbad Escort ❤️ Dharwad Escort ❤️ East Singhbhum Escort ❤️ Jalandhar Escort ❤️ Nilgiris Escort ❤️ Rayagada Escort ❤️ Rohtak Escort ❤️ Saharsa Escort ❤️ Sehore Escort ❤️