Jump to content

artaylor

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by artaylor

  1. Hi @Mithlesh, It depends on how the HTML for the icons is being generated. If they are hard-coded, then @Edison is correct and you can look at his solution. If, on the other hand, they are being generated by template code from data stored in the database (this is how I tend to build it so that the client can modify the social icons without me) then you will need to look a little deeper. Check the code that generates the icons (_main.php is likely) and see if it calling the PW API. If so, it will show you where to go in the admin.
  2. @Robin S Adding the slash at the end worked. You rock and my remaining strand of hair thanks you immensely for your prompt, working reply!
  3. Hi, I have a site the interfaces with a payment processor. As transactions happen on the processor, it automatically calls endpoints on my application and passes a JSON body with the details. Working for a few hours with the payment processor support team we have figured out that the problem is the the endpoint is returning a 301 which they cannot handle. It is also converting the POST to a GET. I thought it was due to the PagePathHistory module as at one point I did move the page to a new location in the tree. However, I have since then tried the following: Moved it back to the original place. Deleted and recreated Deleted and changed the name Truncated the page_path_history table in the database However, I am still getting a 301 and my log file still shows a GET request. Here is the code for the New Subscription endpoint wire()->log()->save('ccbill', 'Add New Subscription Started'); wire()->log()->save('ccbill', 'Request Method: ' . $_SERVER['REQUEST_METHOD']); $ccBillData = json_decode(file_get_contents('php://input'), true); // get the JSON encoded data and convert to PHP array if ($ccBillData !== NULL) wire()->log()->save('ccbill', "Data: " . var_dump($ccBillData)); $ccBillIntegration = modules()->get('CcbillIntegration'); $ccBillIntegration->addNewSubscription($ccBillData); And the results in the log file when I use an API Tester to POST to the endpoint with some JSON 2019-04-30 22:41:51 guest http://site/subscription-new/ Add New Subscription Started 2019-04-30 22:41:51 guest http://site/subscription-new/ Request Method: GET Any and all help is appreciated. I have no hair left to pull out...
  4. @teppo Thank you. I didn't even notice the subforum until just now. Will be more careful in the future. ?
  5. Strange limitation but an easy fix. @BitPoetThanks for the fast reply!
  6. Hi, This is my first attempt to write a PW module. I have built dozens of sites without writing my own modules, but figured it is time to up my PW game. I assume this is a stupid noob error, but I get the "Invalid Module Name" error in admin when I refresh the modules list. Name of class: CCBillIntegration, Name of Module file: CCBillIntegration.module Full extent of .module file: <?php namespace ProcessWire; class CCBillIntegration extends WireData implements Module { /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array */ public static function getModuleInfo() { return array( 'title' => 'CCBill Integration', 'version' => "0.1.0", 'summary' => 'A module to allow CCBill payment processing and user management integration.', 'singular' => true, 'autoload' => true, 'icon' => 'credit-card' ); } } Thanks.
  7. LOL. Well there you go. Assumption once again leading to mistakes...
  8. @adrian You are likely correct. I did not do any real testing. However, as an interesting note, when I posted my previous message you can see the url to youtu.be as a url, however, the link to the video using youtube.com actually embedded the video. So, I have to assume that the forum is using the plugin and it did not show the shortened version.
  9. @strandoo Not sure if this would help, but I notice you are using the short form url on the second example (that does not work) of https://youtu.be/LBY12usmYAA, have you tried using the actual youtube url (which I cannot link to here because it embeds the video)?
  10. @horst Thank you. I will give these a read. I appreciate the help. This forum and the PW users are one of PW's biggest assets.
  11. @BitPoet Thanks for the info. While I have built a few PW sites, I have not had to go much beyond installing some modules and doing basic PW things. I have not gotten to the level of using the API to add data, etc, so if you don't mind sharing a quick snippet of the "import" routine, I would appreciate it. I don't want to take too much of your time, so please ignore this request if it is a lot of time and energy. Cheers
  12. @BitPoet Thousands of rows in one main table that has a dozen or so support tables that would be linked via a Page field in PW.
  13. Hi, I have a project that, based on initial specs, I decided to build in another framework due to the client wanting the ability to regularly import data from an existing manufacturing system. I decided a platform that would allow me to match the imported data to the system would make sense. Since then, the project has morphed (I know, it never happens) and the regular import is unnecessary and so a comprehensive admin is needed. I want to switch to PW but don't want to have to manually link thousands of tables. I have the import routine working for the main table but I am not sure how to import the support tables and automatically create the page fields for them. Oh, in case it matter, the links are not autoincrement id fields, but character codes. Eg. Category table - code: TRN, description: Transportation If someone can point me in the right direction it would be much appreciated.
  14. Cool looking module. I have a question based on my take on PW philosophy. Also, I just had to do some work on a WP site and it took me forever to find some content as it was buried in the Theme admin not WP admin. So, my question is: Is it a good idea to put client editable content outside of the PW database? Now, I and anyone else who is unfortunate enough to have to work on a PW site I create, must know that there is some data in the DB and some in some JSON or PHP files in the template folder... Plus, it does not get backed up with the rest of the data... This is just a question. I go through the process of creating a Settings Page every site, so I do love the idea of something that makes it easier. Keep up the great work!
  15. @Robin S, Thanks. I do have a separate folder from the root with it's own .htaccess file like you have here. However, it does not work unless I remove the .htaccess file in the root of the site (the PW one). I will try again.
  16. Hi, I am trying to password protect a subfolder (not used by PW installation) using standard .htaccess and .htpasswd. However, the main .htaccess file in PW is creating a 404 error. If I disable the main .htaccess, it works. My knowledge of .htaccess and rewrite rules is very limited and nothing I have tried has allowed this to work. All suggestions welcome. Thanks
  17. @LostKobrakai Thanks for the response! Any suggestions on where to look to find some answers? Is this a web server issue (nginx)?, or is this a php configuration issue. I recently upgraded to PHP 7. This was working fine a few weeks ago. I appreciate the help. It is one of the reasons I love PW... the community!
  18. Hi, I cannot install modules from the Modules Directory using the class name. See the attached image for the error. I have tried both TextformatterHannaCode and TextformatterVideoEmbed and both give this error. I installed VideoEmbed manually but it is not working so I decided to uninstall and try again. I started with PW 3.0.57 and when that didn't work, I installed PW 3.0.56 but still not success. Thanks!
  19. Uninstalled the module then tried to reinstall using the Module Class Name but got the following error: I will do a manual install again.
  20. Attached a screengrab of the field setup screen. Not sure if it matters, but when I tried to do the standard install of the module via Module Class Name, I got some weird errors from PW site, so, I installed it manually. It is listed in the modules list and I can access the settings so I am assuming the manual install went ok. I think I will uninstall then reinstall the module and see if that helps.
  21. @PWaddict: Yes it is a textarea with an Inputfield Type of CKEditor
  22. @PWaddict: Thanks. The link is plain text and "Video embed..." is the first text formatter. I tried removing the Hanna Code textformatter to see if it was causing a conflict but it still did not work.
  23. Videos not showing up. PW Version: 3.0.57 TextformatterVideoEmbed Version: 1.1.1 The module is installed. I have added the "Video embed for YouTube/Vimeo" Text formatter to the body field. I put a link with the format "https://www.youtube.com/watch?v=xxxxxx" into the body surrounded by <p></p> tags. However, when I view the site, I just see the text for the link. What am I missing? Thanks!
  24. Hi Sephiroth. Great start! I have been searching for an in-depth tutorial on creating modules so I was delighted to find this thread linked in ProcessWire Weekly. I started reading and adding comments for grammar and spelling and realized it would be much faster if I was able to actually edit the doc. So, I am officially offering my services as an Editor for your document. I figure this would be a great way for me to contribute back to this awesome community and help you help me learn how to write PW modules. If you are interested, let me know and we can go from there. Continue the great work!
×
×
  • Create New...